If I were you I'd definitely start with checking and cleaning the connector for the encoder motor pigtail, and the connector on the TCCM. If not one of the connectors, it's more likely that the encoder motor is bad. If you can get connections to work, the Tech 2 can command the various 4wd modes and you can see what mode is really in effect.
For the encoder motors, I think that Dorman is the only company that makes them new now. From the research I did for mine, the rest in the field are remans. As
@Doubeleive said, the encoder ring is replaceable.
EDIT: I looked back at my May 2019 invoice for my AC Delco encoder motor and it was new, bought from Amazon but from some other place. Cost me $265 and was NEW. I had sent in the Dorman that was a couple of years old for a refund since it quit, although it may have been stressed by the TC before it was rebuilt.