A '98 should have a coolant temperature sensor which serves the PCM (computer) and is used for cooling fan, transmission, and fuel mixture control. There si also a temperature sensor in the transmission, but that was apparently not your trouble code. The sensor you need to find should have a yellow and orange or orange/black wire connected to it.
What was the specific trouble code? There is a code for a shorted/high temperature reading, another code for an open/low temperature reading, another for sensor performance, and possibly another for intermittent sensor signal. Replacing the sensor may have been a waste of time of the electrical connection(s) was not intact. Having an incorrect CTS input can cause various problems, not the least of which is poor fuel mileage, late shifts, hard starting a warm engine, etcetera.