Welcome to TRS
Bookmark this page:
http://www.therangerstation.com/tech_library/index.shtml
Loads of Ranger info there
You will have the M5OD-R1 transmission in a 1994 Ranger.
Very good transmission, Ford used it in all Rangers from 1988 to end of production in 2012.
Slipping out of gear is not a common issue with this transmission.
Most likely cause is that the Dog Gear or 1st gear "teeth" are worn so it no longer locks into place.
Fixing it requires a rebuild.
M5OD-R1 has rubber plugs at the top rear for the shift fork rail installation, as these got old they cracked and allowed trans fluid to leak out.
Trans would start to run warmer as fluid levels dropped causing more wear on the parts inside.
This lead to stripped input gears and other issues, i.e. slipping out of gear.
I would first drain the fluid to see if there are alot of metal fillings in it, this would indicate you should do a rebuild sooner than later.
M5OD-R1 uses Automatic Transmission Fluid(ATF) not 80 or 90 weight gear old, just FYI.
You can often find used M5OD-R1 transmissions as well, fairly safe to go used with these.
But the bellhousing that bolts to the engine is part of the transmission case so it must be from a 4.0l engine.
And if you have 2WD then it must be from a 4.0l 2WD Ranger/Mazda B4000
Or if 4WD then from a 4x4 Ranger/Mazda B4000
In any case replace the rubber plugs with metal ones while trans is out.
1994 is also the last year Rangers used speedometer cables, a newer 2WD trans may not have that hook up, but you should be able to remove and swap tailshaft housings to add speedo cable hookup to newer model trans.
4x4 will have the speedo hook up on transfercase which you are not changing.