I would bet its the speed sensor. A Chilton or Haynes manual should show the exact location of the speed sensor, it's easy to change, it bolts right into the tranny. Just watch out for any fluid that may leak out. Best to do it when the car is cold.
You can always get a build sheet for your Jeep, it will tell you what tranny you've got.
I had the speed sensor go in my '93 a long time back, right before I sold it. It did the same exact thing you're describing. It's a fairly common problem with GC's, if I'm not mistaken.
2001 Jeep Grand Cherokee Limited 4.7L Selec-Trac: 2" Fat Bob's/BDS Coil Lift, Bilstein 5100 Monotubes, JKS Quick Discos, Rough Country 2.2 Steering Stabilizer, OEM Tow Hooks, Kenwood Excelon KDC-X890