i would buy oem sensors/solenoids. some vehicles don't mind duralast or whatever off brand autozone/advance uses, jeeps aren't one of them. oem sensors and electronics are best(not always best quality, but works the best with the computers.)
before you get the cart ahead of the horse, get 6qts of atf and drop the pan to see what comes out. if you've got a lot of metal and sludge, look for a lower mileage junker or a rebuild. if your fluid is just burnt and there isn't much shavings, get the solenoids and a filter and replace those with a cooler flush as well.
if you see any brass/copper colored shavings that's "bad" and you're gonna want a rebuild.
'97 zj 5.2, some stuff, some other suff, and some things that even work sometimes.