Sweden officially joined the North Atlantic Treaty Organization on Thursday after two years of negotiations, dealing a blow to Russia as it looks to halt the organization’s expansion in Europe during its war in Ukraine.