Duolingo uses "dans le future", but accepts "a l'avenir" in a sentence. On the discussion page someone stated that the former would be an anglicism, is it?
Both expressions seem to be common, as far as I can tell after looking at the translations on Reverso context.
Interestingly, the preposition changes, so it's always dans with future and à with avenir? I.e. you wouldn't say "au future" or "dans l'avenir"?