You're saying he was justified in lying. I disagree, but let's leave that aside.
He could have said "I lied, but I had to for national security reasons. I don't apologize. The question was inappropriate and Wyden should apologize for asking."
He could have said "I lied, and I shouldn't have. I apologize." (A resignation would be nice.)
But he's quoted as saying "My response was clearly erroneous – for which I apologize."
To me, this sounds like "I thought I was telling the truth but later learned that my statements were incorrect. I apologize."
Which is itself either 1) an admission of incompetence or 2) an additional lie. #2 is much more likely.
Do you see why I called this "apology" contemptible?