You're right that fossil fuels are contingent. They exist because of a big evolutionary coincidence that might not be repeated on other worlds.
It's possible, though, that aliens might not need fossil fuels to get to space. If they had more efficient photosynthesis, for example (ours is <5% efficient), living plants could have the energy content of gasoline. They might eat gasoline. All their fuel usage would be carbon neutral (CO2 pulled out of the atmosphere). They would be way ahead of us.
Or it's possible that we're the most advanced because fossil fuels are necessary and nobody else got them.