Hello and yes
What year 2.9L?
There is wiring to be done and you should get a 4.0L trans and a bonus would be the front and rear axles.
A 2.9L is very similar to the 4.0L sans the MAS and the DIS ignition (no more distributor) You can piggyback these systems onto your existing 2.9L (easier in later years 89-90 of the 2.9L, some had MAS, 91-92 years of the 4.0L are very similar to the late model 2.9L) or you can install the 93-94 style 4.0L power distribution and computer wiring into your truck (preferred method)
This conversion can be done as easy as an engine change IF you are prepared with the harness and all the parts you will need. I personally would not do it this way, I would grab the 4.0L cooling, drivetrain, and axles as well (pssst buy the whole donor, 93-94 Explorer or Rangers make the BEST donors IMO)
What year is the BII (86-90)
What year is the 4.0L donor and what truck is it?
both 5 speeds? auto? 2wd?