Trains are feasible to run on electricity, since they run on fixed tracks and you can have overhead cables or 3rd rail configurations. There is no realistic chance that ships and planes will not use petroleum fuel for the foreseeable future.