USNA takes a number of factors into account regarding validating courses. First and foremost is how you perform on their placement/validation exams during Plebe Summer. Officially, scoring well on AP exams does not guarantee you will receive credit at USNA, but I think (depending on the score of your validation exam) they can help make the difference.
My daughter validated 8 classes and she did not score a 5 on all those AP exams. And she had a 'strange' conversation about Chem II, where they actually asked her if she wanted to take it or not (I am thinking her validation score for Chem II was very close to what they were looking for and she did score well on her AP Chem exam) She took Modern Chemistry which fundamentally is Chem II, but it has a different course # than Chem II.
The program is 47 months. The service academies will give you the opportunity to validate, but they want to make sure the foundation is there - especially math/science, so they are not incentivized to approve validation unless they are very comfortable you are ready for the next level course.