While Wakanda is a fictional place, it's firmly rooted in the real world continent of Africa, and designed to reflect the peoples and cultures of sub-Saharan Africa. The racial identity of Wakanda is an important part to the story of the region and how it is seen by the rest of the world.
Meanwhile, the gods of the Norse pantheon (and pretty much all gods in general) aren't human. In the MCU specifically they're aliens from space. So while the characters were created by the peoples of a certain region, gods are mostly just humanoid avatars for natural phenomena used to tell creation and morality tales, and their skin color is merely a product of who named them and not really a key part of what makes them what they are.
A more appropriate comparison would have been to ask if it mattered having a white Danish man play an Egyptian god. On its own I don't think there's anything wrong with that, but the reason that movie got so much backlash was because ALL the main characters were played by white European and Australian actors, which of course brings up the issue of whitewashing.