I just finished rebuilding the m5r1 from my 4.0 Ex using the parts from a 4 cylinder Ranger's m5r1.
Yes the gears are way different as well as the shafts themselves.
I tried to use the gears and countershaft from the ranger tranny and it all seemed well until I tried to bolt the bearing retainers on and it locked up.
I ended up going babk to my original shaft, bought a used 2nd gear for my 4.0 tranny, and used needle bearings, springs/keys, synchros, and hubs from the Ranger tranny and it worked like a charm.
If you have the time/patience I suggest rebuilding that thing yourself. It wasn;t nearly as hard as I expected and certainly not worth the $850 my local tranny shop was asking for LABOR ONLY on a bench rebuild. How the #### are those kind of people even in business?