Did Kaji know that he was going to die in Episode 21?
He knew that he was going to die but it was not directly due to his espionage.
Freeing the kidnapped Fuyutsuki is the most likely cause of his death according to the dialogue in episode 21.


  Misato:         Hello, I am away right now. Please leave your message
                  after the beep.
  Ryouji:        My last job...
  ...
  Fuyutsuki:      It's you.
  Ryouji:         It's been a while.
  Fuyutsuki:      This action will result in your death.
  Ryouji:         All I wish is to get closer to the truth...
                  within me.
  Script