To be more precise, the TPS is usually mounted on the side of the throttle body, often near the throttle cable linkage. It's a small sensor with a connector plugged into it. You'll likely see a couple of screws holding it in place.
It's best to consult a repair manual specific to your year and model Dodge Ram for a diagram and detailed instructions, as the exact location might vary slightly depending on specific trim level or minor manufacturing differences. A picture search on Google Images for "1998 Dodge Ram 5.2L throttle body" might also help you visualize its location.