His father and grandfather were both four-star Admirals, so the name "John S. McCain" is pretty much seared into that rank already. In addition to US-approved nepotism, he's also got heavy DC (and therefore Pentagon) ties and is famous worldwide as a P.O.W. If he stays in the Navy after '81, I can see him easily becoming a Rear Admiral by the mid-'80s, and working his way up to full Admiral before retiring.
With name recognition from three sources, He'd probably make a good CNO following Kelso's retirement in '94 (although what Boorda would do in that situation is unknown and probably sad). The timeline works out for others.
An idea could be like this:
* 1977-1979 (age 41-43) - Commander, Senate Naval Liaison (RL)
* 1979-1981 (age 43-45) - Captain, Senate Naval Liaison (RL)
* 1981-1984 (age 45-48) - Captain, Pentagon job of some sort. Possibly back to NAVAIR (Naval Air Systems Command)
* 1984-1986 (age 48-50) - Rear Admiral (lh), Vice Commander of NAVAIR
* 1986-1987 (age 50-51) - Rear Admiral (uh), Vice Commander of NAVAIR
* 1987-1990 (age 51-54) - Vice Admiral, Commander of NAVAIR
* 1990-1992 (age 54-56) - Admiral, Vice Chief of Naval Operations
* 1992-1994 (age 56-58) - Admiral, Commander of Pacific Command
* 1994-1997 (age 58-61) - Admiral, Chief of Naval Operations
* 1997-2000 (age 61-64) - Admiral, Chairman of the Joint Chiefs of Staff
* 2001-2006 (age 65-70) - Secretary of Veterans Affairs
* 2006-2009 (age 70-73) - Secretary of Defense
* 2008 (age 72) - Republican nominee for Vice President of the United States