A 72-year-old man has died after he was taken to hospital with serious leg injuries after being hit by a train.