I would pull out the Tech Sheet to help with troubleshooting, should be located inside the Control Panel (unplug dryer first then remove upper rear plate on the back of control panel to gain access to the tech sheet).
Try running the Dryer on Timed Dryer to see if it will work normally.
If it does work normally then it could be the moisture sensor is corroded with fabric softener residue, just clean it off with Isopropyl Alcohol but unplug the dryer first (moisture sensor has 2 metal strips and it's either located in front of lint filter housing or inside rear panel where the drum attaches).
Otherwise, could be related to an electrical part or lint buildup inside the lint filter housing which causes longer drying time (remove lower front panel by releasing the upper spring clip located about 4-6 inches from each corner, use a putty knife or flat head screwdriver to release the spring clip pull out on the upper corner as you release each clip).
To troubleshoot electrical part's, you need a Digital Multimeter available at most Hardware Store's for $10-20
FYI: Your dryer is about 15 years old (manufactured in 1999), so you may want to replace it.
You can probably find a new one at Home Depot or Lowe's on sale for around $350.
If you do replace it get a Whirlpool/Maytag/Kenmore Brand with the Rotary Control Knobs (stay away from the fancy push button controls due to the circuit board going bad).