It is literally his right under the second amendment to carry a firearm. In fact, this is the position argued by most conservatives. However, he did not fight them at any point, and in fact, he did not even draw his gun.
Analysis of video clearly shows they took his gun away, which he had not drawn previously, then put him on his knees, then executed him:
https://xcancel.com/adamscochran/status/2015119306086900170