Wikipedia:Naming conventions (military ranks)

As per Manual_of_Style/Capital_letters, military ranks follow the same convention as WP:Job titles regarding capitalization. When an article is about a military rank itself, the generic format is used for the title; for example, Able seaman, instead of Able Seaman. However, in article text, when used as title, the rank is capitalized; for example, "Able Seaman John Doe". When used generically it is not capitalized, for example, "John Doe has the rank of able seaman".