Manual trans from a Ranger that has/had a 2.8l, 2.9l. or 4.0l OHV or SOHC engine.
These all have the same transmission bolt pattern.
M5OD-R1 would be the best choice they were used from 1988 and up to 2011
From a 4.0l, 1990 and up, would be overall the best one since it will have better gear ratios for 4.0l power, but not a deal breaker by any means.
You know the 4.0l SOHC engines need the 104 pin computer(EEC-V), and only a 1997 computer from an explorer with 4.0l SOHC won't have the PATS anti-theft stuff.
And a 1997 explorer computer will be for an automatic, so will cause a few issues unless you have it programmed for manual, which isn't cheap.
Mustangs used the 4.0l SOHC starting in 2005, they would have PATS but could be found for manual transmission use.
No sure any one makes a 4.0l SOHC intake for carb conversion, they did for OHV but not the same engine.
And distributor for SOHC would be out as well.