Accepted; to be absolutely clear, it would have to be "He travelled only by train his whole life". Depending on the context, I would still be strongly inclined, personally, to infer that he travelled only by train during his lifetime.
A better set of examples then: "He travelled to Spain by train", and "He often slept on trains when he visited Spain". In the first, "by train" and "on trains" are interchangeable; in the second, "by train" cannot be substituted.
I fear that, as is often the case, the original poster had his answer half a dozen posts ago! I think we are all agreed that you cannot say someone travels by the trains, that it might be possible, but unlikely, to say someone travels on the trains, and that, depending on context, our joint recommendation is one or other of "by train" and "on trains", with "by train" likely to be the most commonly used.
I hope that accurately sums up the thread for usingenglish.