Effective leaders tend not to be stabbed to death by their own subordinates.
Jon had some good ideas about how to adjust the Watch's priorities, but had no sense of how to justify those ideas to those who disagreed, instead relying on the authority of his position to force things through. But even in a feudal society, you're not going to get far without cultivating personal as well as institutional loyalty. (Tyrion made the same mistake in A Clash of Kings
.) He took the wrong lesson from Aemon's advice to "Kill the boy," thinking it was a command to isolate himself and act like an utter hardass. As readers, we know that Jon genuinely cares about the Watch and is (in most respects) doing his best to maintain its mission in difficult times. But someone like Bowen Marsh isn't reading Jon's POV chapters, so all he can see is a Lord Commander who rode with the wildlings very recently, and is now as likely to get advice from them as from his own men. Since Marsh doesn't know he's in an epic fantasy series, he can't be sure there'll be a big confrontation with the Others that will justify treating the wildlings as allies.
And from the beginning, Jon had trouble sticking to the part of his oath that involved renouncing who he had been for the good of the Watch. Fandom cheered when he beheaded Janos Slynt, but while that was technically justifiable in terms of Slynt's disobedience, it's hard to escape the sense that it was also an act of revenge. Especially when he then allows Melisandre and Mance to attempt a rescue of "Arya," and announces plans to lead a wildling army against the Warden of the North. It's hard not to sympathize with Jon there, given what a monster Ramsay is, but at the same time, according to the standards of the society it's flagrant oathbreaking.