It seems very co incidental it should start after the starter motor change, but a few things are possible.
Look on top of the box, around the end of the battery tray area, and you will see a massive connector going into the gearbox, a round one, take this off IGNITION MUST BE OFF, and put back on a few times, look for any signs of moisture in the connector.
Don't confuse with the other electrical connector further towards the front of the box as this is something else, which will have a round shaft end and scribe lines to line up.
Don't despair as it is almost definitely the valve that live sunder this big connector and they are around £35, the box is TOTALLY electronic in gear selection, the selection will be seriously violent in nature and can clear itself, but will recur at some point.
Quick easy fix, my advice take to a auto box specialist, they will drive it, and have a very good idea of the problem.
Generally they're not bad boxes, ealier ones 95-99, had some problems with clutches and clutch drums breaking, plus a particular servo diaphragm splitting, but still good.
Best thing you can do for the box, esp if towing is a oil/air cooler for the box.
tabetha