I got on a train going the opposite way and didn't realize until two stations later.
The reason I was late is because I got on a train going the opposite way and didn't realize until two stations later.
ご質問ありがとうございます。
この場合は、「反対方向の電車に乗ってることに、2駅進んでから気づいた」は英語で「I got on a train going the opposite way and didn't realize until two stations later.」と言えます。
遅刻した理由をあげたいなら、最初「The reason I was late is because...」から始まれます。
最終的に「The reason I was late is because I got on a train going the opposite way and didn't realize until two stations later.」になります。
ご参考になれば幸いです。