Had the same thing happen with mine (2006 3.7L) about 2 years ago, had to replace the tcm on the tranny
fortunately had an honest trans shop that did it and trans fluid change. Also had seals replaced during the service too. Never got a code until it got REALLY bad. Would happen, I'd pull over turn it on & off and seemed to go away for awhile, but towards the end, it was doing it constantly that's when the CEL came on. I think he said the tcm had some codes in to when he checked it, just cant remember....
Just something to consider....its was infuriating while trying to drive and it just wouldn't move.