Hi Guys, I am new to the forum but not new to Jeep builds so I thought I should give some recently learned advice from my own build. :-)
I am currently working on a 2.5 to 4.0 swap in my 94 YJ. At this point I have done everything that I would have done if I had swapped a Chevy 350 into it. It can be more costly than a 350 swap too. However, if you can get all the parts needed from the doner jeep it might be a little easier and cheaper.
Here are some things I have learned so far:
--Electrically, the only change needed is adding the injectors to the harnes and using the 4.0 distributor and charging system. Then ECM for the 4.0 works fine.
--Physiccally, everything is in a different location. I had to cut off the engine mount perches and weld them back on in the 4.0 location. Sounds easy, but it requires fitting the engine several times to make sure everything clears. My advice, measure everything!! I measured the distance from the nose of the crankshaft to each frame wall and then measured the distance from the center of the output shaft on the transfer case to each frame wall. I measured the rake angle of the drive train using an angle finder. I meaasured, distance of 2.5 to hood, firewall, etc. You name it, I tried to measure it. Once the 2.5 drive was out I measured the angle of the engine mount perches without mounts attached. Then I took all the 4.0 measurements using my neighbor's 92 YJ and tack welded the perches in place. Modified the skid plat to make the transmission mount wholes in a new location and did a fit test. A doner skid plate might make for a good reference point if you do a whole drive train fit before the final weld. After that I did the final weld and undercoat.
The AX15 is 1" longer than the AX5 so the drivelines need to be shorten/lengthened or have enough play in the slipe yoke. I have Tom Woods custom drive shaft so the slipe yoke play was sufficient for my build. You could probably just transfer these from your doner yj and be fine if you get the perches welded in the right place.
I could go on with many...many more things I have learned in the process of this swap.
The main thing I learned is that I could have bought a 4.0 YJ for the same amount I have spent so far. Of course, I rebult the 4.0 to a 4.6 strocker so that added a nice chunk of money.
Anyway, I say do it!! Even with every challenge I have faced, if I had a whole doner to have started with, I'd do it again. Although I agree with Timberwolf, do not try to put the AX5 transmission behind the 4.0. Go with the auto out of the doner (another can of worms here I'm sure) or find an AX15 somewhere. OH, and don't scrap the doner until the swap is done and running. I did that assuming most of my 2.5 parts would swap over fine and I found out they do not. Things like shift tower and transfer case shifter will kill a rebuild when you had the part in your hand and thought you didnt need it :-(.
Best of luck!