Drowning a man at sea is murder.
You’re assuming the captain intended him to drown. The invader came out of the sea, one presumes he can swim back to where he came from originally.
Not is he has left his own perfectly good boat to board yours. One of the favored tactics of Somalian pirates is to pretend to be a disabled vessel. When a rescuer comes up, he is boarded. overwhelmed, and captured.
The captain's first duty is to his own crew.
If I were to encounter a boatload of people who started swimming to my own boat with the clear intention of boarding, why shouldn't I shoot them before they got to my boat, which would be self-defense, not murder.
If only one swims over, he may be probing to see what happens. Let him aboard and there may be 50 more right behind him.
I would never trust the intentions of an overcrowded boat full of men claiming to be refugees. Unless they are visibly sinking, the correct course of action is to notify the local Navy or Coast Guard and repel boarders as necessary.