It depends. While you may have been in school for more than 4 years, you could still qualify for the credit if you have not claimed American Opportunity credit for 4 years and you were still in undergraduate classes. Here is an FAQ with more information: https://ttlc.intuit.com/replies/5358150
Having said this, if you do not qualify then there are two ways to state this in TurboTax. One way is to state for how many years you've claimed the credit (4). The other way is to say that you were taking post-graduate classes (that may be a stretch, but you will still be pivoted to the other school education benefits, the Lifetime Learning Credit and the Tuitiion and Fees Deduction).