If you use the desities cited in this article https://www.google.com/amp/s/theconversation.com/amp/teslas-batteries-have-reached-their-limit-heres-how-they-could-go-further-64765 Especially the 350wh per KG = 350 mile electric cars i.e the Model 3 and take a look at locomotives it looks like you replace the engines and fuel and other dead tractive weight above the 120K one running gear on the locomotive and you need about 1.5 freight cars per 2 locomotives to get equivalent range. Used to do this kind of thing with solid fuel coal. So you'd just have battery cars which rail logistics easily handle as freight. Would load the locomotives with battery modules just as easily. If you hit the 650wh per kg looks like range even without battery cars would exceed current locomotives by a good bit. Get a zero emmision system with much lower operational costs. Reduction might not be as good as with a semi but still hugely significant and a huge improvement on noisy idling locomotives. Guessing battery cost would be about a 885K-1M per locomotive where current cost of locomotive is avg 1.7-2.3M save at 50% on fuel, maybe Electric locomotives have been around a long time, magic where they dont even have to carry their batteries as in mag lev. Might say hyperloop is already looking at this but that's less freight oriented at this point.
Proof of concept: http://www.chinadaily.com.cn/business/2017-10/20/content_33487988.htm Notice its a 7MW locomotive- higher power then the greatest Diesel.