Treason is treason

If a ranking military official says he called the opponent to advise them off his military’s actions is that treason?