It's not as easy a swap as you may think. You still need to cut the motor mount perches from the frame and move them forward for the 4.0L, and change the input shaft on the
transfer case to match the output of the tranny behind the 4.0L. You will need a new engine harness as well, custom or from a 4.0L donor. These are all things you need regardless of swapping a 4.0L, 4.3L, or 5.7L. You're choice isn't necessarily a bad one, just not much easier than swapping in better engines. Something to chew on.