An ocean boss is a popular but very problematic idea. Boats are very fragile, and solo players can't attack and sail at same time. But what if instead of a boss, it was more like a final event that triggers Ragnorok and rolls the credits.
According to mythology, Jörmungandr, the Midgard serpent is a huge seamonster that wraps around the whole earth and bits its own tail. During Ragnorok it will release its tail, at which point Thor has dibs on fighting this thing.
Final event: once you hang up every boss trophy you must sail to the edge of the map to summon Jörmungandr.We want the whole map to seem flooded and surrounded by Jörmungandr. The event is a race back to the center as the map shrinks. Once you make it back to the boss trophy stones the combined forsaken powers cause Jörmungandr to release its tail. Ragnorok begins, Odin thanks you and askes you to fight by his side. Thor swoops in to punch Jörmungandr and the credits roll.
Here is where some program trickery comes in. Actually flooding the whole map would be nightmare. Actually surrounding whole map with a wall of serpent flesh would be nightmare. Avoid both, plus portal cheese by making the final event happen on a dungeon map. No matter what edge of the map you start on you enter the same ocean dungeon with your boat. Just an endless plane of ocean. On only one side you make a wall of serpent flesh as far as a player could see. This wall chases you to other side of dungeon where the stones are. On the way you could have giant waves, leviathans, and coils of Jörmungandr to dodge. Maybe even fake mountain peaks. Because it's a dungeon, you don't have to worry about player built structures or portals trying to cheese their way to the finish line.
Solo players could still do it because all you need is to dodge and race. Multiplayer could ride in same boat or each get their own. You could add regular serpents to give them something to shoot at or allow shooting obstacles to remove them from the path. Since it's on its own dungeon floor, players that are not involved on the server could just continue about without suddenly drowning underwater.
Source: https://www.reddit.com/r/valheim/comments/zz8xbz/jörmungandr_as_a_final_boss_event/