Unfortunately, the best way to turn diesel into motion is an internal combustion engine, and internal combustion engines have very poor efficiency.
And then diesel-electrics have more losses converting that to electricity, and then more losses again to convert back to rotational power.
It is more efficient to generate electricity at a power plant and electrify the tracks, because power plants can far exceed 50% efficiency. Also they can run on something less dirty.