OP, don't want to be a downer discourage you or a pessimist BUT read on if you dare.
This is going to be long, be patient, read if you want the least headaches and a full understanding what you're getting yourself into. Don't take an engine swap lightly. Many, many give up and abandon the job part way through because they become overwhelmed or misjudged what was involved space wise, financially or physically.
1st a couple of questions to the OP:
If you are good at working on things yourself and can fabricate, A Magnum V8 swap is the easiest and closest relative to the native 2.5L 4-cylinder engine that came in early TJ's, easier than a 4.0L possibly PERIOD!
2nd, Your transmission won't work, don't even think of keeping or re-using it as it will just fail in short order as a light duty 125 horsepower rated weak link, it's not worth saving at all.
3rd. If you can't fab and are going to pay someone to do the work for you, Just swap a rebuilt 4-cylinder in your Jeep and sell/trade it off for a 4.0L 6-cylinder. Too much complication and too much expense to pay someone else to build your Jeep unless you have VERY DEEP POCKETS and don't mind budget OVERRUNS!
Just sayin' so save you lots of $$$ and headaches.
You'll thank me later in this.............
If I didn't scare you off yet then read on my dear boy:
Since your jeep is effectively down now with a blown engine, you should start by reading and researching EVERY POST on every forum you can about the swap. Research is key to doing this successfully and asking questions to those of us who have done it and are willing to share our experiences.
Next, outline what you have for a budget, what you want out of your Jeep and what you hope this swap will gain you. Ask those who have done it if you will truly see these benefits such as power, driveability, reliability and mileage you think you are going to get. BECAUSE TALK IS CHEAP!
After research, questions and talking to those of us who have done swaps, next is to start gathering parts for the swap before you even put the Jeep under the knife.
Importance and success is in the details:
Things to keep in mind when researching and asking questions include: Does your Jeep need to pass SMOG or inspections in your state, county and city or township? Is an engine swap legal where you garage and use your Jeep? Do you need SMOG legal equipment on your engine to pass and will it have to pass a computer scan to be registered? Will you ever sell it in the future and don't want trouble with the buyer when they can't transfer title and register it in their name because of illegal engine swap not passing inspection?
Understand your Countries Laws first before proceeding and know this in the U.S. of A. :
The engine you install in any registered motor vehicle that is post 1975 year must be NEWER or EQUAL to the year of the vehicle for which it is going into if it is to be operated on public roads PERIOD! This is a FEDERAL LAW preempting any state and local laws. I'm not saying you can't get away with it if your state and localities don't check but be forewarned you better not sell it after the fact to someone living where there are inspections to check for this or it will bring trouble.
If your state has inspection like California's enhanced area inspections then you must have ALL emissions controls from the engine that is being swapped into the vehicle and at minimum, what the original vehicle had on it cannot be removed or altered unless installing NEWER MORE ADVANCED emissions technology in the Jeep.
Having been through the process several times in the Los Angeles area, I can assure you they will check EVERY PART NUMBER against what the donor vehicle is supposed to have on EVERYTHING RELATED TO THE SWAP and you can't con your way out of it at all.
The engine must be out of the same class of vehicle. Therefore, you cannot put a truck engine that is over 6000 Lbs GVWR and expect it to pass in a 1/4 ton Jeep. Not going to happen so choose your donor well. Look at the MOPAR swap grid on HOTWIRE AUTO website to see if your engine is using the same communications bus as your Jeep does native. This saves lots of headache on MOPAR family engine swaps and makes things much easier when your gauges all work and talk to the ECU properly. On GM swaps, you'll have to start over or get an interface box to work the factory gauges.
Pick an engine from a 1/2 ton truck that is light duty or SUV light duty or car to put in your Jeep. Don't buy your neighbor's 1-ton HD and use it for the donor, you'll be foiled by the inspection if you try and they are modeled after California.
I would buy an ENTIRE DONOR VEHICLE to get ALL SMOG AND ECM related parts from the same vehicle saving you lots on "junkyard nickel & dime" parts.
Also a hint: If you are going for a Magnum, the BEST DONOR is another JEEP. Get the 5.2 or 5.9 from a ZJ Grand Cherokee for early TJ. The starter is on the correct side of the engine, the transmission will work and can bolt right up to the Wrangler transfer case and all emissions will be adaptable. A 4.0L fan shroud will work with the 5.2L mechanical fan and look like it came from the factory that way. The power steering will connect right up and have room, look and work just like stock Jeep TJ stuff, Alternator is 100% connected the same with ECM control and uses the battery temp sensor just like your TJ. The connectors and pinouts on the ECM are the same for the same bus ECM's regardless of application on MOPAR products. The same pins are hooked to the same sensors making it a lot easier to build or troubleshoot a wiring harness. You can blend the existing body harness and dash gauges to the donor harness or add wires to the 4-cyl harness. You can integrate the existing fuse blocks and PDC under the hood into the MOPAR swap, something not as easily done on a GM or other swap.
On a GM Vortec swap, you'll need a stand-alone harness that runs the engine and emissions controls with possibly the transmission and fuel pump/sender. It will have to have a MIL lamp (check Engine) light on it and it's easier to have a separate fuse block for all that. There are lots of people who build harnesses and one I highly recommend is over on Pirate plus is a vendor for all things Gen III/IV/V related, talk to Wayne Heartwig I believe his company is called 150tunes.com . I have used his services on a few GM Gen III/IV swaps and he has built me harnesses that passed the strict California Referee inspections first try. Everything plug-&-Play worked like a champ and my scan-tool worked perfectly. He also supports tuning for performance or economy, I can't say enough good things about his work.
There is a lot more I myself and others such as
@Wildman can share in more posts.
I just wanted to start the conversation you need to have and be realistic about what you are getting yourself into here in plain talk, no B.S. or spin.
I loved doing the swaps and I loved the outcome in MOST of the swaps but not everyone can fab or wrench like I can so be prepared, information is your friend here.
Parts:
Engine with all drive accessories DONOR
ECM and engine bay harness DONOR
Emissions controls and evap. controls DONOR
Transmission DONOR or ELSEWHERE if your donor didn't have what you wanted.
Motor Mounts AFTERMARKET (Advanced Adapters, M.O.R.E. or Novak)
Transfer case adapter (Aftermarket or not needed if original MOPAR TRANS)
Exhaust catalytic convertors DONOR
Exhaust O2 sensors & bungs DONOR
Exhaust header piper DONOR
Starter DONOR
Fuel pump/sender (DONOR or Original Jeep if MOPAR SAME FAMILY BUS)
Gauges (FACTORY if MOPAR SAME BUS otherwise Aftermarket or from GM donor on Vortec)
Harness piping or loom (Aftermarket or FACTORY RE-USE)
Harness connectors (FACTORY IF MOPAR SAME BUS or Aftermarket)
Transmission shifter (FACTORY IF MOPAR or AFTERMARKET if other)
Throttle cable (DONOR or factory if MOPAR)
Radiator (AFTERMARKET or factory with adapter hoses) or
optional aftermarket radiator but for MOPAR 5.2L I've found the factory Jeep works and for GM 5.3 etc, it has to be aftermarket conversion radiator.
Driveshafts (PROBABLY CUSTOM LENGTH AFTERMARKET, usually if you have a lift you'll want double cardan anyways to keep angularity down)
Axles (Factory Dana 44's will survive unless really built engine) Also Dana 30 front will suffice in the meantime unless very high power and abuse such as burnouts and hard wheeling like rock crawling.
**The Dana 35 will not live long behind any V8 engine swap and should be swapped for Dana 44, 9" or an 8.8 Explorer axle at minimum to prevent future repairs.
More later.....
RR