Welcome to TRS
4.0l M5R1s used different gear ratios than the 4cyl and 3.0l V6 M5R1s
Good page to bookmark for future use:
https://www.therangerstation.com/tech/
Go to transmission section
Select Ford Ranger Manual Transmissions
You will see the different ratios
So no, internals from a 4cyl or 3.0l M5R1 will not be the same
Just a heads up
1990 to 2000 Rangers/B4000s used the 4.0l OHV engines(160HP) and the M5R1(M5OD-R1)
2001-2011 Rangers/B4000s used the 4.0l SOHC engines(207HP) and the M5R1-HD
The 6 bell housing bolts line up with either
But the "HD" models have an extra bolt hole(7th bolt) in bell housing and a different shifter setup
Gear ratios are the same in these two but not sure about all the internal shafts and bearings
If you wanted to swap the whole transmission then an M5R1-HD from a 4WD can be use in your 2000, as long as you get the shifter with it
Both used the same clutch and transfer case as well
2001 and up have an extra sensor on the top rear, OSS sensor, it was for use with a new speedometer set up, not in the way so can just be left in place and unhooked