As much as I despise Musk for being a total piece of shit, this isn't treason. Technically, we aren't even allies with Ukraine. The argument could certainly be made that this works against the interests of the United States, but that alone isn't treason because it isn't a crime for citizens to oppose the US, especially when it's private property the US is being lent. Because at that time, the US hadn't signed a contract with Musk yet.
If he did this again, then it would be a breach of contract, but still wouldn't be treason. People being charged with treason is very rare, because it's a such a high bar to meet.