The most common reason for a 5HP24 holding onto the lower gears is that the fluid is overheating. This is because the controller inhibits upshifts to ensure that the engine revs (and therefore the oil pump speed) stay high, to maximise cooling flow. The condition may be real (because the cooler is blocked) or false (because the temperature sensor is giving a spurious reading).
If this isn’t the issue, it could possibly be because there’s a problem with 3rd gear e.g. a problem with the D-brake.
If you have some diagnostic kit that can read off live values for the fluid temperature, this would probably be your best bet. Alternatively, you can test the sensor reading between pins 13 & 14 at the 16-pin connector on the casing:
or between pins 12 & 22 at the ECU:
Phil