There is nothing to stop you from applying, but your chances of being selected for endo straight out of school are pretty much zero. Endo is the second most competitive specialty in the Navy (right behind ortho), and it is somewhat overmanned at the moment. When I was looking into it as a dental school senior, the specialty leader himself said that he would not support the selection of a student straight out of school. He wants you to be a general dentist for a few years, not only to gain clinical experience, but also because there are a lot of Navy experiences that are no longer open to you when you become an endodontist, such as serving on a ship.