First of all, to clarify some numbering, HR 4635 (107th Congress) was not actually passed. The language was passed as part of HR 5005, becoming Public Law 107-296, and this provision now appears at 49 USC 44921.
The exact text of this provision is:
A Federal flight deck officer shall not be liable for damages in any action brought in a Federal or State court arising out of the acts or omissions of the officer in defending the flight deck of an aircraft against acts of criminal violence or air piracy unless the officer is guilty of gross negligence or willful misconduct.
The language makes it clear that this is only referring to civil liability. So, if the officer is defending the flight deck, and they are sued for damages resulting from their actions, the plaintiff will not win (assuming the law is correctly applied). But this law says nothing about whether or not they can be prosecuted for a crime. In any case, the officer in your example does not appear to have been defending the flight deck, so this law wouldn't apply at all.
In your example, the officer's defense against a murder charge would probably be based on defense of others. There is a discussion on Justia. It seems that a key question would be whether shooting the unruly passenger was proportional - was there a reasonable fear that the passenger was actually going to kill someone?