He made the promise during a visit to Sweden and Finland, where he met Swedish Prime Minister Magdalena Andersson and Finnish President Sauli Niinistö.
Sweden and Finland are currently considering whether to join NATO following Russia's invasion of Ukraine.
This is an important week for the NATO debate, with Finland due to announce its decision on applying to join the military alliance on Thursday morning.
The new agreement will “fortify northern Europe’s defences, in the face of renewed threats,” Johnson said in a statement.
“These are not a short-term stop-gap, but a long-term commitment to bolster military ties and global stability, and fortify Europe’s defences for generations to come,” added Johnson in the statement.
In practice, British military has already been cooperating closely with both Finnish and Swedish militaries under the terms of the Joint Expeditionary Force, made up of ten northern European countries.
The Kremlin has threatened “military and political repercussions” if Sweden and Finland decide to join NATO as Russia considers the further expansion of NATO to be a direct threat to its national security. Kremlin spokesperson Dmitry Peskov warned in April that Moscow would “take additional measures” to make its defences on the Western flank “more sophisticated”.
In a statement, the Finnish president's office noted that the pledge of mutual military assistance was "a political declaration and not a legally binding commitment under international law".