I'm a Japanese native, and 「道が混んでいて、バスが駅に着くまでとても時間がかかった」 would sound natural to me.
If I had to compare the two:
I think the former sets the mental time to the moment the bus arrived, while the latter sets that moment in the past. I don't think it makes any significant semantic difference with this example though.
In the following example, the former sounds better (and the latter sounds unnatural).
IMO this is because you couldn't breathe up until the point of time when the bus arrived. It'd be odd to say "you had finished not breathing by the time the bus arrived" (the latter phrasing).
In the following example, it's the opposite, and only the latter works.
IMO this is because it's odd to say the icecream melted up to a specific point in time when the bus arrived (one wonders if the icecream might stop being melted at that point). It's more natural to say the icecream had finished melting by the time the bus arrived.
With the bus example, both are not unnatural ways of saying it, and IMO thus both work.