A person who, at any time during which the United States has been or shall be at war, deserted or shall desert the military, air, or naval forces of the United States, or who, having been duly enrolled, departed, or shall depart from the jurisdiction of the district in which enrolled, or who, whether or not having been duly enrolled, went or shall go beyond the limits of the United States, with intent to avoid any draft into the military, air, or naval service, lawfully ordered, shall, upon conviction thereof by a court martial or a court of competent jurisdiction, be permanently ineligible to become a citizen of the United States; and such deserters and evaders shall be forever incapable of holding any office of trust or of profit under the United States, or of exercising any rights of citizens thereof.