That's right. Two of the cases the Gemara brings are a guy who aims to kill a behaima and misfires & hits & kills a person doesn't go to golus & a person who thinks he's shooting at a behaima but its really a person. Even though these cases aren't EXACTLY what your case is, the gemoro also says that oimer muttar doesn't go to golus & only derech yerida goes to golus etc. etc.
& your case of trying to hurt someone & really killing him, one can wonder if it has a din of a sonei (since you see he tried to hurt him) who never gets golus because we say he was maizid unless its the type of maiseh that is clear it was a total accident. (tosfos says like if he fell off a roof onto him, because he put his own life in danger)