I also found that particular step not to work too well. There’s a few alternative approaches there, but one I found seemed worked OK was to register the mean b=0 image to the GM parcel from the 5TT image, using linear interpolation (not nearest-neighbour), and ensuring the strides match (and are NIfTI standard). This looks like this:
...
mrconvert mean_b0_preproc.mif -stride 1,2,3 mean_b0_preproc.nii.gz
mrconvert 5tt.mif -coord 3 0 -stride 1,2,3,4 5tt-gm.nii.gz
flirt -in mean_b0_preproc.nii.gz -ref 5tt-gm.nii.gz -dof 6 -omat diff2struct_fsl.mat
transformconvert diff2struct_fsl.mat mean_b0_preproc.nii.gz 5tt-gm.nii.gz flirt_import diff2struct_mrtrix.txt
...
I’m pretty sure I’ve seen other approaches mentioned on the forum, I recommend you search for them and see what works best.