It was just a coincidence that I arrived there when I did.
I just happened to be there at the right time.
「ちょうどそこに居合わせた。」
It was just a coincidence that I arrived there when I did.
「そこにその時間についたのは偶然だった。」となり「偶然そこにいた」ことを言えます。
例文:
I just happened to be there at the right time when I caught a glimpse of Lake Mashu.
「摩周湖がちらっと見えた時、ちょうどそこに居合わせた。」
It was just a coincidence that I arrived there when I did. It was perfect timing, I could see the lake in all its beauty.
「そこにその時着いたのは偶然だった。完璧なタイミングで美しい湖を見れたんだ。」
ご参考まで!