No.. You need to read the Code of Conduct. Here it is. (Current version.)
I
I am an American, fighting in the forces which guard my country and our way of life. I am prepared to give my life in their defense.
II
I will never surrender of my own free will. If in command, I will never surrender the members of my command while they still have the means to resist.
III
If I am captured I will continue to resist by all means available. I will make every effort to escape and to aid others to escape. I will accept neither parole nor special favors from the enemy.
IV
If I become a prisoner of war, I will keep faith with my fellow prisoners. I will give no information or take part in any action which might be harmful to my comrades. If I am senior, I will take command. If not, I will obey the lawful orders of those appointed over me and will back them up in every way.
V
When questioned, should I become a prisoner of war, I am required to give name, rank, service number, and date of birth. I will evade answering further questions to the utmost of my ability. I will make no oral or written statements disloyal to my country and its allies or harmful to their cause.
VI
I will never forget that I am an American, fighting for freedom, responsible for my actions, and dedicated to the principles which made my country free. I will trust in my God and in the United States of America.
McCain refused to take special favors. Getting to go home early, before those who were captured before him, would definitely have been a special favor. Whatever information he brought would not have been worth the betrayal of his fellow POWs.