Looking and you can try, but I don't think it will work due to how the TPS is wired for the cruise control.
The plugs are the same and 98% of the pin outs are the same except for that cruise control and TPS.
I am taking a guess here by looking at the diagrams that it looks like it will work but your SOL on having a cruise control.
OR it could be the other way around and it wont work at all and you will keep getting a CEL for a throttle position sensor.
If you have the 97 ECU on hand, plug it in and see what it does.
If it doesn't work then I guess your SOL on the swap dude.