That's not true.
1) modern railway is fully IGBT powered. In this case it is trivial to inject current.
2) with DC current you need a substation capable of converting AC to DC (easy: bridge rectifier) but also DC to AC (to given tolerances) which is much more cumbersome.