I had that thing happening to me once. I was able to convert electrified rails into normals rails (by accident, I was converting narrow tracks to normal gauge and the electrified line was next to it).
The problem is that it was a tunnel, and the game then refused to convert to line back to electrified because of the train stuck in the tunnel. Couldn't do anything. I ended up reloading the game
I know it doesn't help, but the problem isn't unknow to me at least. Since them, I double check everying before converting rails
Maybe, a less dramatic solution if you haven't saved in a while would be to send a suicide train on the rails to destroy the stuck train.