The Uniformed and Overseas Citizens Absentee Voting Act (UOCAVA) accords the right to vote in Federal elections (President, Vice President, U.S. Senator, U.S. Representative, or non-voting delegate from DC, PR, GU, etc.) to a citizen of the United States who has LEFT the "United States" and moved (temporarily or permanently) to a place that is NOT in the United States.
UOCAVA defines several terms, including the term "United States." That term, when used in a geographical sense, means the 50 states, the District of Columbia, the Commonwealth of Puerto Rico, the United States Virgin Islands, Guam, and American Samoa. The Northern Mariana Islands has now also been added to territories covered under UOCAVA.
Let us say that Joe Smith, a civilian and citizen of the United States, moves from the State of New York to the Commonwealth of Puerto Rico. Is Joe Smith eligible to vote in New York by absentee ballot under UOCAVA--no. Joe Smith has NOT left the United States. For UOCAVA purposes, Puerto Rico is just as much part of the United States as New York.