Hi and welcome to the wonderful world of transmission conversions.
yes a 2.9L 5 speed will bolt up to a 4.0L OHV.
HOWEVER the 2.9L's used 3 different transmissions (5 speeds) through the years, and all of them are much weaker then the later version of th eMazda 5 speed used behind the 4.0L starting in 89.
In 93 the Mazda 5 speed was upgraded internally again, making this an ideal choice for your conversion.
You will need the flywheel, clutch assembly, starter, throw out bearing, slave cylinder, hydraulic line, master cylinder, clutch pedal assembly (comes with both brake and clutch pedal) clutch 3 position switch, the transmission wiring harness from a 5 speed Explorer or Ranger (91-94 OHV 4.0L) and a 93 4.0L 5 speed computer.
The pedal assembly from a BII or Ranger will not work, it must be from an Explorer (91-94)
I higkly recommend getting all parts you need from a 93 4.0L powered truck, it will make it much much easier for you.
Also you can search for this, you are not the first to go this route. Being the crazy sob I am I started with a 2.9L and Mitsubishi 5 speed, then converted to a 93 4.0L and Mazda 5 speed, then to a 93 automatic A4LD. After 3 A4LD's I finally went 5.0L.
Also if your truck is a 4x4 make sure you get the trans from a 4x4 donor.
now do some research and see if most of your questions are answered.
Expect to do some minor wiring changes, although getting the 5 speed trans harness from a 93 Ex will reduce these a great deal.