In 98 the AW4 added a front input speed sensor, and the rear output speed sensor changed from 1-pulse/rev to 4-pulse/rev. I think the TCU jumped over to the drivers side of the dash in 98 as well.
You can use the 97 TCU and and ignore the extra sensor, but to deal with the rear sensor change you'll need to pull the tailcone off the AW4s and swap the rotors and use the 97 sensor. If you have the FSM, it has a nice picture and it looks like a 1-banana job. The connector on the solenoid/sensors changed, so you'll need to either do some cutting/splicing or just drop the pan and swap the harness over. Probably easier to swap the harness over. WIth the pan off, it's one bolt where the wiring enters the tranny and three wires inside to unclip from the solenoids.
Or you if you really want to get knee deep in cutting and splicing, you can swap in the 98 TCU. As you noticed the wiring harness has two extra wires (they go to pins 1&2, btw) and all the connectors are different. You'd have to do a bunch of cutting and splicing.
As a side note, if you use the 98 TCU, if you decide you want to do the manul shifting mod or the mod that gives you a toggle switch to hold it in 1st, it will throw the check engine light.