YOU SAID:
they ran towards the train
INTO JAPANESE
彼らは電車に向かって走りました
BACK INTO ENGLISH
They ran for the train
INTO JAPANESE
彼らは電車に走った
BACK INTO ENGLISH
They ran on the train
INTO JAPANESE
彼らは電車で走った
BACK INTO ENGLISH
They ran by train
INTO JAPANESE
彼らは電車で走った
BACK INTO ENGLISH
They ran by train
Well done, yes, well done!