I swapped a 99 Dakota 5.2 into my 88 Jeep that was carbed. To do it I used a 95 Jeep Grand Cherokee wiring harness. So basically what you're doing, a 99 engine with a 95 harness.

The sensors on the 98 will have different connectors on them. You will have to swap your throttle body sensors, etc all from the 5.2 onto the 5.9. Also the 95 will have a coolant sensor on the intake manifold that the 98 will not have. You will have to drill and tap for this sensor. The intake is aluminum and very easy to drill and tap.

Also I believe the later year injectors flow more than the earlier year ones. Since your computer is expecting a certain amount of fuel flow, I would swap the injectors over from the old 5.2 to the 5.9. The added benefit of this is the ECU in stock form is said to way over fuel at full throttle so I bet having a 5.9 in there wouldn't be a bad thing. Will surely perform better than the OBD-2 era 5.9's with the death flash.