You have to meet following two conditions for US citizenship application:
1>. You have been US permanent resident for at least 5 years. You can apply for citizenship within three months before your 5th-year anniversary.
2>. 5-year continuous residence: You did not have trips of 6 months or longer abroad during your 5-year US residence.