Arg, I just had a long answer typed up and firefox crashed.
Anyway, swapping the tranny output shafts is a near complete tear down and the shafts may not swap as there were a few internal changes along the way.
Also, the 98 tranny will not work with your 89 TCU. At least not without some work. The 98 AW4 will have an extra input speed sensor that you can ignore, but the rear speed sensor is different. The 98 output speed sensor puts out 4-pulses per rev and the 89 TCU is expecting 1-pulse per rev. I found this out the hard way after swapping in a 99 AW4 and wondering why it was upshifting at 800 rpm. I have not done this personally, but someone did post with pictures confirming that you can pull the rear of the transmission off and swap over the sensor rotor and use the older speed sensor. My fix was a bit more involved as I built a custom interface box to adapt the output signal - not really an option unless you're an eleectronics weenie like me.
After all that, what are the symptoms? Are you sure its a mechanical failure and not an electrical issue? The most common issues are a bad TPS (they do wear out), solenoids, and very rarely the computer itself.
-Chris