'for ages' is better with a perfect tense, but you might get away with it in the past continuous. I would have said I knocked on the door for a long time . 'for ages' means for a very long time.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.