On top of the comma splice, there’s a bit of pronoun trouble here, plus wonky verb tenses. Let’s fix the punctuation and verbs first.
The captain often visited him. He told him that when he grew up, his job would be to kill people.
Still needs work. Which he is meant each time? I know it’s possible to make an educated guess, but the reader shouldn’t have to guess; it should be clear from the writing itself which character is being referred to. If I were in charge of editing this in a manuscript, I’d recommend a further change: The captain often visited him and told him that when he grew up, his job would be to kill people. See? No pronoun confusion, and the words are barely changed at all.