Whoever, owing allegiance to the United States, levies war against them or adheres to their enemies, giving them aid and comfort within the United States or elsewhere, is guilty of treason and shall suffer death, or shall be imprisoned not less than five years and fined under this title but not less than $10,000; and shall be incapable of holding any office under the United States.
treason is more about declarations of war, a foreign party may be involved but it’s not required.
18 U.S. Code § 2381 - Treason
treason is more about declarations of war, a foreign party may be involved but it’s not required.