I am not an expert but my understanding is the electromotive
configuration is better suited to locomotives. An internal
combustion engine is used to run a generator or alternator and the
electricity then runs the electric motors that drive the
wheels.
+++
The diesel engine IS used in small locomotives, usually with a
hydraulic transmission. Larger locomotives use either electric or
hydraulic drives but the prime mover is still a diesel engine.