I had the exact thing happen on a 97 Dakota 4x4. I replaced shift solenoids, changed fluid and filter, changed speed sensors, one in trans and one on rear. I finally had enough, took it to a trans shop and within 2 hours they found a broken wire.