If when not hooked to track, the transformer should stay on as you turn the throttle. Check with a voltmeter or 6-24v bulb etc.
Hooked to BARE track it should also stay on. If not check your wiring and seperate the connection track from all others.
If the connection still doesnt work you're doing something wrong or that conn track has issues you haven't found.
Once you have one piece of track that works, now try the loco on it. maybe add one piece of track extra, no more.
If it works, add one piece of track at a time until it stops. There is the problem piece.
Or use an ohm meter and check the track for continuity(connection) between center rail and outer rail, check the loop then pull one off & check again, and or check each piece (alone). Any connection is bad track.
Before hand you may want to lay the loco on it's side and touch the wires to roller and frame and it should try to run. If it didn't spark badly or trip the breaker but didn't turn, try again it may be in neutral. You should also detect the eunit coil buzz.
Oil it before you start, and check that grease hasn't hardened on gears or in the e-unit too. (flush clean with WD-40 or CRC electrical cleaners... and WD40 is not a lube, use a good oil like mobile 1 or something new and train specific.)
Same for old oil varnishes (3in1varnishes)