John Adams participated in some minor skirmishes at sea, but they would probably be seen more as acts of smuggling instead of military. He turned 40 in 1775, the year of the first pitched battles of the Revolution at Lexington and Concord, at a time when average life expectancy in the Colonies was in the mid-30's. As a wealthy and influential businessman, he organized the finances and material supplies of the Continental Army, in a role that was roughly parallel to the Secretay of the War after the new government was formed under Washington in 1791 under the 1789 Constitution.
There have been several Presidents who did not serve in the active or reserve military, but t is the first to actively evade service in time of war.