Not being Navy, commander = captain?————— O-5’s found on many ships as Commanders. Captains are O-6. usually the Larger vessels (My guess, but I’m Army.).
Doesn’t make any difference what the rank is, the Commanding Officer a Naval vessel is always referred to a “Captain”. It can be an 03 commanding a minesweeper, and 04 commanding a LCS, an 05 commanding a destroyer or an 06 commanding a cruiser, carrier or battleship, all are referred to as Captain