His target was a military installation both times.
That doesn't, in and of itself, exclude him from being considered a terrorist.
However, and moreover, Khan was purported to have been responsible for an attack on a branch of Federation Archives, supposedly not
a military target. Khan was thereby accused
of being a terrorist. The "drone strike" was ordered to punish that alleged crime, which was in fact a false charge, because the building attacked wasn't really an archive.