Here's why:
* Frame Differences: Even if the overall dimensions are similar, there will be differences in mounting points for the engine and transmission. You'll likely need to fabricate new engine mounts and potentially transmission mounts.
* Wiring Harness: Simply swapping the harness is unlikely to work. While the engine's internal wiring might be similar, the connections to the rest of the vehicle's systems (fuel injection, sensors, gauges, etc.) will be different due to changes in the vehicle's electronics and computer systems over those four years. You'll need extensive rewiring and potentially a custom harness.
* Exhaust System: The exhaust system will need modification or replacement to fit the new engine and frame.
* Cooling System: Potential incompatibility between the radiator, hoses, and other cooling components.
* Fuel System: The fuel lines and potentially the fuel pump may need adjustment or replacement.
* Body Mounts and Dimensions: While the overall shape might seem similar, minor dimensional differences between the frames could affect body alignment and fitting after the extensive cutting and welding.
* Safety and Legal Concerns: Making significant structural changes to a vehicle's frame (cutting and welding) without proper engineering and certification could compromise its safety and legality.
In short: It's *possible* with extensive fabrication, welding skills, electrical knowledge, and a deep understanding of automotive mechanics. However, it's an extremely complex project, far beyond the scope of a simple engine swap. It's more akin to building a custom vehicle than performing a simple repair. The cost and time involved could easily exceed the value of the vehicle. It's generally far more practical to find a 4.0L engine that's compatible with the 1989 Wrangler's frame.