In some countries, long-distance travel is even already 100% renewable https://gruen.deutschebahn.com/en/projects/ice
It’s mostly the US, the UK, and other countries with third-world infrastructure that still heavily rely on diesel in long-distance train travel
The US is second only to china in terms of ton-kilometers of freight transported and moves nearly an order of magnitude more freight by rail than the EU.
With the exception of China, which has both massive freight and transport rail systems, most countries tend to trade off between transport of freight. The reason the US's transport rail is awful is because it's freight rail is incredible. And though it may be diesel it is a remarkably efficient use of is (as opposed to the trucks necessary for transport if you don't use trains)