Sir Keir Starmer has said he will lead Labour into the next general election, as he attempts to move on from his biggest leadership crisis yet.