Officials said the train, carrying more than 400 passengers, was trapped inside a tunnel in a mountainous area as the driver was wounded in the attack