02 Cadillac problem

Engine light comeson. Was told it is a sensor in the transmission. Had fluid changed and light went out. Two months later it’s back. Do I need a transmission rebuild?

No, not automatically. Have a reputable shop read the code and diagnose the problem. Any guess as to the need for a transmission would just be a wild unfounded guess.