That would depend on the type of essay. Say, an essay for a presentation, yes, you would. Any public essay is one you would capitilize the title. Ex: The History of Mr. Guy Source from- Yuri Veshielshikove
You capitalize all rank that is part of a title, for instance: Private Qunicy Sergeant Jones Captain Wally It is not necessary to capitalize rank that is not part of a title, for instance. "John wanted to become a sergeant in the US Army."