That is not true. Treason includes assisting enemies of the USA who are in "open conflict" with the USA. There's nothing in the Constitution saying that there needs to be an officially-declared war.
This is the text of 18 U.S. Code Sec 2381:
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.
I'm aware that treason charges are rare and convictions even rarer, but still. Trump has given the enemies of the United States "aid and comfort".