I had a similar problem, and it acted up more on longer drives. When I didn't drive the car for a few days, it would shift okay for a day or so. The first extended drive, though, and it would act up. My transmission range selector was bad. I also had the same TC code, so don't just run out and have the TC replaced without further diagnostics. I replaced the range selector and have not had a problem in several thousand miles since.