How have you come to the conclusion that I'll need to amplify?

Because that digital pot is 20K. So suppose it is half way down, between the 12V power and your train you have a 10K series resistance. Lets suppose you train had zero resistance, it doesn't but it is very small compared to 10K.

The maximum current your train could draw would be given by ohms law I = E/R where I is the current and E is the voltage and R is the resistance.

So plugging in the numbers

12 / 10000 = 0.0012 amps or 1.2mA

That is not enough current to drive a motor. It is more likely that your motor takes between 100mA and 600mA, so there is not enough current behind the voltage to power your system. This is formalised by saying that your voltage source has a 10K impedance. You see impedance mentioned in audio but it applies to anything sourcing a voltage.

Your train controller is probably not a pot but a variable resistance in series with the track. This is likely to be a very low resistance and will limit the current to the train's motor.

Ever thought why you can short out the contacts on a dry cell battery and nothing much happens, then you try it with a car battery and you get sparks and metal melting? That is all to do with the source impedance of the battery. For a car battery it is very low and so allows a large current to flow. For a dry cell it is very high and that limits the maximum amount of current you can draw from it even with a short on the output.