Answer:
Could be on, or in. Depends on the type of car. Please ask a new question with the make and model info.
Domestically speaking, the only manufacturer that places the range sensor on the internals of the transmission is a Chrysler dodge Plymouth. Everything else I can think of is external.