Fuel capacity of a diesel electric locomotive: 6200 gallons
Energy density of diesel fuel: 40kWh/gal
Total energy capacity of full fuel load: 248 megawatt hours
Tesla battery pack weight: 540kg
Tesla energy capacity: 85kWh
Weight of equivalent battery pack for a diesel locomotive:
248 MWh / (85 kWh / 540 kg) = 1575 metric tons
Weight of a diesel locomotive: 196 metric tons
So you'd roughly 10x the weight of a locomotive by trying to make it run on batteries, leaving aside the challenges of actually trying to charge those batteries.
Another fun fact: that locomotive can run flat out at max power for 2.2 days without refueling.