If the electricity could be delivered directly to the train, the energy used would be cheaper, but installing (and replacing "shrinkage" of) many thousands of miles of "third rail" would cost a lot.
The hydrogen is not yet cheaper than the kerosene, but costs on that side are falling fast.