When I look at the vocabulary entry for stèisean I see sentences using both ann an stèisean and aig an stèisean, the former translated as in a station, the latter as at the station.
They differ in preposition (ann an ‘in’, aig ‘at’) and in definiteness (ann an – indefinite, aig an – definite). Duolingo often expects you to use the most literal translation (in a for ann an, at the for aig an), and even if both at and in could be possible, the definiteness (a station vs the station) makes only one of them correct.
No, it’s not the preposition. You could say aig stèisean and it would mean at a station. It’s the presence of the article an (sg.) / na (pl.), or lack thereof.
Although some prepositions change their form before the article, so in in Gaelic is ann an (here the an is not the article, it is part of the preposition!), so ann an taigh is in a house, but it changes to anns before the articles, so anns an taigh is in the house, anns na bàtaichean in the boats, etc.