Separated by a single vowel, and in most English accents that vowel is barely pronounced in ordinary speech. Which is exactly why the mistake survives proofreading. You hear yourself say the sentence correctly and your eye slides straight over the wrong letter. Unlike some usage questions, there is no grey area here at all — one is about time, the other about comparison, and they never overlap.
An adverb of time or sequence. It answers "when" or "what next."
A conjunction used in comparisons. It only ever appears when two things are being measured against each other.
Quick way to remember
Ask whether the sentence is comparing two things. If it is, you need "than" — comparison and "than" both carry an "a." If the sentence is about time or what happens next, it is "then," which shares its vowel with "when."