I think the dinstinction needs to be made between being in Command and being a Captain. Picard and Riker might have been offered commands at younger ages, but no necessarily the rank of Captain. The Stargazer was not a top of the line ship when Picard commanded her, just the sort of ship for a young Commander to get.
Keep in mind that it is common to referr to the person in command of a ship as "Captain". So, for example, a young Commander or even Lieutennat Kirk would be reffered to as "Captain" by the crew , and probably addressed as such in communications. Likewise, Picard could be "Captain of the Stargazer" and not necessarily hold the actual rank of Captain.
Most information on Kirk indicate that he was a bit older when he took command of the Enterprise. THe orginal series premise described him at age 34, and the most commonly accepted timeline (Okuda) has Kirk around 32 when he get the Enterprise.