Its not going to be worth it unless someone gave you all the parts for the 4.0L swap. Even then the time spent doing it could be put toward better things.
To swap in any other engine your going to need: Engine, transmission, and wiring harness, motor mounts, transmission mounts (depending on the engine, 5.0L ext.), headers (5.0L), and so on.
A 5.0L swap will run about the same, your going to have to do the same amount of work to get either engine in there and the 5.0L will probably get you better MPG and will without a doubt give you more power. Not to mention its got more aftermarket.
Sorry, I know its the last thing people want to hear but a 5.0L really is the way to go.
1996 Ext. Cab 5 Speed
3.0L - 60,000 (rebuilt engine)
Warn Manual hubs
31' BFGoodrich A/Ts
2.5' Glasspack Exhaust
New Clutch, flywheel, pressure plate, & slave cylinder
2" lift spring