I had this problem over the weekend with my 2005 Jeep GC Laredo. Engine revd up the rpms when in drive going 25 mph like it was in neutral and manually going into overdrive or switching gears didn't work with the +/- option on the stick shift. Thought it was a speed sensor issue but it turned out it was a broken gas cap that allowed air to breach the fuel tank. The speed sensor bases its calculations on pressure levels when burning fuel and air in the tank can cause Jeeps (Chrysler made cars) to lock the transmission into a limp or safe mode that locks it into one gear.
However your problem might be different if your gas cap is tight and working properly. It could be the actual transmission input/turbine speed sensor. For that have the memory card on the vehicle read. To replace that you can buy the singular part for anywhere from 150-200. There is a chance however you'll have to replace the whole valve body. If that's not your problem it could be a wiring or computer issue which would be a lot more money.
I switched gas caps the same day it happened, took it to the mechanic, and he could recreate my issue and said the car was fine. In that 2 days the new tightened gas cap allowed for the fuel tank to depressurize which allowed for the speed sensor to again work properly thus unlocking the transmission.
If all else fails its possible there is something wrong in the fuel pump or the vacuum mechanism that keeps air out and creates suction for the drivetrain to work properly. Check for any transmission fluids leaking (should be a pinkish color) when your car is running while parked.
Hope this helped.