Please use standard English in future posts.
The answer key was wrong and you got the right answer but for the wrong reason.
'N' is indeed a consonant, and when said aloud sounds like 'en'. It's because it begins with a vowel sound that it's preceded with 'an' and not 'a'.
Student or Learner