The prime minister insisted he was “thinking actively” about fighting the next two general elections to become the longest-serving post-war leader.
He urged Tory MPs plotting to oust him not to focus on the issues he has “stuffed up” after his authority was further diminished by a Cabinet resignation.
And he insisted questions over his leadership were now settled after the loss of Wakefield and former stronghold Tiverton and Honiton triggered a Cabinet resignation.
Mr Johnson insisted the “endless churn” of allegations is “driving people nuts”, as he pushed on with his Rwanda trip despite suggestions further ministerial resignations could follow.
Oliver Dowden resigned as Tory party co-chairman, saying he and Conservative supporters are “distressed and disappointed by recent events” and telling the prime minister that “someone must take responsibility”.
But Mr Johnson set his sights on being in office in the “mid 2030s”, in a run that would see him outlast Margaret Thatcher’s reign.
Asked by journalists at the British high commissioner’s residence in Kigali if he will lead his party into the next election, he said: “Will I win? Yes.”
In a buoyant mood, the prime minister added: “At the moment I’m actively thinking about the third term and what could happen then, but I will review that when I get to it.”
He argued he needs to remain in office to focus on his levelling-up agenda, saying: “It’s going to take time.
“And I want to keep driving it forward.”
Mr Johnson insisted he was making “substantial progress” on his main ambition but conceded “it’s not going to be accomplished overnight”.
Former Conservative leader Michael Howard has urged him to resign for the good of the party and the nation, and he called on the Cabinet to consider resigning to force him out.
But Mr Johnson said: “I love my colleagues and of course I would urge them respectfully: golden rule of politics, the more we focus on Westminster politics the more irritating it is to voters.”
He argued that “what’s driving people nuts is this endless churn of stuff about things that I’m meant to have stuffed up or whatever about my colleagues, their views of me, my character, the leadership, Tory blah blah…”
But there are suggestions of a challenge to change the rules of the 1922 Committee of Conservative MPs in order to allow another vote of confidence in Mr Johnson within the next year.
Asked if he believes questions over his leadership are settled, Mr Johnson replied: “Yes.”
Instead of partygate and other scandals, Mr Johnson insisted the public wants to hear about the cost of living and economic plans.
Conservative veteran Sir Geoffrey Clifton-Brown, who retained his Cotswolds seat with a majority of 20,000 at the last vote, is among the Tories to have expressed fears they could lose their jobs at the next general election.
In the by-election in the Devonshire constituency of Tiverton and Honiton, a dramatic swing of almost 30% from the Conservatives saw their 24,000 majority overturned by the Liberal Democrats with 6,000 more votes.
In West Yorkshire, Labour seized back Wakefield with a majority of 4,925 on a swing of 12.7% from the Tories.
Wakefield was one of the so-called red wall seats won by the Tories in the 2019 general election after being held by Labour since the 1930s.
Foreign secretary Liz Truss argued that the dismal performance for the Conservatives in Thursday’s by-elections will not be the predictor of the next general election.
Speaking to reporters in Rwanda, she said: “The reality is that incumbent governments often lose by-elections and often people want to send a message in a by-election to raise concerns with the Government.
“But that doesn’t make by-election results the predictor of election outcomes, it hasn’t been the predictor in the past and I don’t believe it will be the predictor of the next general election.”