The capital of the United States is Washington, D.C. (District of Columbia). It is a federal district, not a state, and not part of Virginia, Maryland, or any other state.
The Residence Act of 1790 created a 10-mile-square district on the Potomac River, donated by Maryland and Virginia. The Virginia portion (Alexandria, Arlington) was retroceded in 1846. The remaining district is entirely from Maryland’s original cession.
Virginia neighbors D.C. across the Potomac, but the capital is its own jurisdiction.