This comes up from time to time, and I always leave the same reply; do NOT attempt to CTB using a train.
Firstly, you have no guarantee of an instant death. You may die, but you also could be mangled first by the train. You could even survive and be left a ruin. However, the big problem with this method is the collateral damage. The train driver will be left knowing that he drove a train that killed someone, bystanders will witness the gruesome spectacle, and some poor souls will have to clean up.
Please, do no do this.