1998 Subaru transmission/ speed sensor

This Subaru is the 2.2L H4 auto. I was wondering if anyone has replaced the gears for the speed sensor inside of the transmission. What happen was we got water in the speed sensor out side of the Transmission and it seized, shredding the plastic gears inside of the the transmission. I was wondering if it was better off trying at home to replace the gears or just going to the local subaru parts place and getting a replacement transmission for this car. we think this car has over 200k on it too and would like it to last

also with this car the center diff. was shortly messed up with it and it was FWD shortly till I pulled the fuse for the FWD and it worked with AWD