You can apply for 公民 at any time within 90 days before the 5th year anniversary of the GC or at any time after the 5th year anniversary. Do not file the application 91 days before anniversary. Also, make sure that you do not have 6-month or longer trip per year outside US during the 5 year period.