We are in California. Leagally it can't be done. But it might depend on the referee you take the Jeep to after the swap. Some say the engine had to come in the same model vehicle, others say it has to be the same brand.
Read this:
http://www.autorepair.ca.gov/80_BARResources/07_AutoRepair/Engine_Change_Guidelines.html and let me know what you think.
My recent experience is...
Must be a California emissions equipped engine
Same year or newer
Same class vehicle (i.e. Light duty vs. medium duty, heavy duty)
All emissions equipment from the engine must be installed on the new vehicle, and all of the pertinent chassis emissions equipment must retained.
Everything must be functional as far as OBD(on board diagnostics) is concerned
All non OEM parts must carry a CARB Exemption for the vehicle the engine came from.
As long as you stick to these rules it is doable.
I've seen swaps get denied because the engine came from a truck, and seen them get passed when the same engine came from a car, all because of the donor vin on the receipt from the wrecker.
They are very by the book. Once had a fully functional swap in a Toyota get bounced, because the Check engine light was not correctly marked. Just had a temp "CH" label under it.
My experience and how I read the rules, I would think a Hemi from a 300 would swap legally into a TJ as they are both light duty vehicles. However I would expect a Hemi from a RAM3500 to be denied, even though they are basically the same powerplant.