Natural gas is mostly methane.
So it would have to either be compressed or refrigerated to cryogenic temperatures for it to be stored.
That aside, I've decided to consider nuclear-powered locomotives. Nuclear fission has a certain problem: there will always be a minimum nuclear-reactor size for it to work, even in the best of cases. The existence of such a limit is easy to understand, though finding it is another story entirely. A nuclear reactor works by nuclear fissions making neutrons that cause other nuclear fissions, something like a fire continuing its existence by igniting more material with its heat. And for the reaction to continue, each neutron must have a sufficiently-large probability of hitting a fissionable nucleus, and to ensure that, the neutron must travel more than some distance in the reactor. This means that a reactor cannot be too small, or else its neutrons will escape, like a fire that loses heat too rapidly.
So I searched for "smallest feasible nuclear reactor" and "smallest possible nuclear reactor", and found very little; the closest I found was
What is the smallest possible nuclear reactor?, where elephantwalker claimed:
A nuclear reactor design is based upon three things:
1) the neutron crossection of the fuel
2) the density of the fuel
3) the method of heat removal
higher neutron crossection, and higher density gives more reactivity for the reactor per volume. This is why dense forms of u-235 such as UN or uranium nitride give the smallest size reactors. This type of reactor is in the megawatt range, and is the size of a small trash can.
This type of reactor has been tested for space travel (JIMO).
Such a reactor uses highly enriched uranium (HEU; more than 20% U-235); naval nuclear reactors go up to 50% U-235. By comparison, weapons-grade uranium is 90% U-235, most nuclear power plants use 3% to 5% U-235, and natural uranium is 0.7% U-235.
Its volume is about 0.1 m^3, and its mass is about a ton, assuming that it is all uranium nitride (density 11.3 g/cm^3). This is not much different from various structural materials, like steel (iron alloy; 7.8 g/cm^3).
Could it fit in a locomotive and power it? A 4000-hp locomotive is a 3-megawatt one by units conversion, and locomotives can weigh in at 100 - 200 tons. This means that this kind of nuclear reactor has a size, mass, and power suitable for locomotive duty. By comparison, on flat roads, one of the most powerful vehicles is the
Mack Titan truck, at 605 / 451 kW. It is just below the limits of this kind of nuclear reactor.
Locomotive nuclear reactors are a potential safety nightmare, since they are not buried inside of big containment buildings or ships or submarines. But there has been some effort to design reactors with
passive safety, meaning that they do not need outside intervention to shut themselves down if they suffer a
loss-of-coolant accident (LOCA). Thus, in some designs, if the coolant (usually water) starts to boil, then the reaction slows down from neutrons not being slowed down enough by collisions with coolant nuclei.
But even if it shuts itself down, it will still have a heat source: its decaying
fission products. This means that it would still need to be cooled, though by the square-cube law, this will likely be a less serious problem for a small nuclear reactor than for a large one.
I think that such a reactor ought to be torture-tested with a LOCA or a collision to see how well it holds up.
In any case, locomotive nuclear reactors would likely provoke a strong NIMBY reaction in many populated areas.
The heated water in the reactor could boil, and the resulting steam could drive a turbine, which would drive a generator, thus making the locomotive a steam-electric one. The locomotive could also be the traditional direct-drive sort of steam engine.