Problem like this could be sensor related.
It's a guessing game unless you have access to a diagnosis scanner for transmission.
Usually for 50-100 bucks a transmission can diagnos the issue within a few minutes.
One thing you can do. With teh engine running.
Pull the transmission fluid dip stick. The color of the fluid should be a redish color. Slightly darker if it's old. Next smell it.. Yes that's right.. Smell it. Does it have a hint of burnt toast? If it does or looks black, your clutches in the transmission are burnt up and you will be looking at a rebuild.
If the color is red, doesn't smell burnt, and you don't see any blackness in the fluid. Then you probably have a sensor or the transmission vacuum module.
I'm at work now But I'll post some pdf files to show you how to check and test the vacuum module.