You need an object with defend to convey the proper meaning of the word. Otherwise, both sentences will be grammatically incorrect.
You defend someone or something.( except sport where it can be used without an object)
Same with protect:
I care about the environment and it’s my job to protect. ( Incorrect)
I care about the environment and it’s my job to protect it.
If a person is charged with a crime they haven’t committed ( didn’t commit), it’s my job as a criminal lawyer to defend them ( their rights).
Whether you use past simple or present perfect is up to you. Present perfect would suggest some sort of consequence of the past action. However, the meaning of your sentence has already covered it. Present Perfect is slightly more used in British Eng than American Eng when it comes to casual conversations. In formal language, the use is identical. Present perfect is a bit more favoured in essays ( my experience), sounds a tiny bit more formal and contributes to the word count ;). Didn’t commit would be more idiomatically common for sure, though.