Imagine the equation if the diesel fuel burned had a carbon tax on it, and the electricity (provided by overhead wire) was almost free due to the exceedingly low cost of renewables.
Of course it would be an enormous effort to electrify train lines across America; it should still be done.