Its not illegal for anyone to lie.
But it is very illegal to lie about classified information you have access to to those who do not. This is just furtherance of your INTENT to commit a crime using the classified information.
It certainly can be illegal to lie; depending on circumstance, who is doing it, and probably other details. And as you noted.