With the switch to two sensors in 1998, the rear speed sensor changed from 1 pulse/rev to 4 pulses/rev. So, you need to swap the rear sensor rotor and sensor if putting a 98+ AW4 into an older Cherokee that expects 1 pulse/rev.
1997-2001 AW-4’s have a different Neutral Safety Switch (NSS) than the 1996 and earlier.
The transmission input spline count is 21 splines for 1987-1990 and 23 splines for 1991-2001.
87-90
0.70:1 OD ratio
21 spline output shaft
Electrical connections- early model
One transmission speed sensor (output only)
91-96
0.75:1 OD ratio
23 spline output shaft
Electrical connections - early model 6 pin wire connector
One transmission speed sensor (output only) 6 pin wire connector
97-
0.75:1 OD ratio
23 spline output shaft
Electrical connections - late model 8 pin wire connector
One transmission speed sensor (output only)
98-01
0.75:1 OD ratio
23 spline output shaft
Electrical connections late model 8 pin wire connector
Two transmission speed sensors (input and output)