An occupied boat cannot move through a whale or sea serpent per the following rule (from 30th anniversary edition).
If you move a Ship containing one or more Explorers into a sea
space containing a Sea Serpent or a Whale, the Ship is immediately removed from the game, its passengers becoming Swimmers
(don’t forget that if the sea space contains a Shark or Sea Serpent,
these Swimmers are immediately removed from the game).
However, you may move empty ships per the following rule. These ships can move freely through whales and sea serpents.
When a Ship is empty, any player
can move it from one sea space
to another, as desired (at the cost
of one movement per space).