When mine did that it was my VSS, it was badly plugged in. But it caused the same thing, and the transmission did erratic shifting.

It's the VSS for sure, in my opinion / experience. Change the VSS or Check if it's plugged in good.