The easiest way I find is to look directly downwards, right click to exit, and then carefully hop from the boat.
It still moves, but not so much.
Perhaps Mojang may address this in a future update?
It might be worth going to the Get Satisfaction page for Mojang and seeing if it's been raised as an issue already.
If not, raise it.
gaming.stackexchange.com/users/303/Jasarien
What I normally do is the same as I do for minecart stations: put a minecart on a rail on the shore, then surround that with half blocks.
You can then right click on it from the boat, magic-ing you into it and not disturbing the boat.
It might not be what you are looking for, but it is simple and works well.
gaming.stackexchange.com/users/8671/OrangeAlmondSoap
Make a dock out of soul-sand and run your boat into it.
It won't immediately break against the soul-sand, unlike other materials, and once it is stuck in the soul-sand it will stay put unless you shove it out.
gaming.stackexchange.com/users/1327/Zoredache
Make sure you enter straight, or else you'll spin around unpredictably.
If the boat is completely still, you don't need to do the space+arrow manuever.
Just don't move, click on the boat to get off, and jump.
The currents keep the boat stable and in the spot you leave it for future trips.
It isn't quite as elaborate as docks with doors, but it does involve some tricky currents so your mileage may vary.
Source: Boat Science on MC Forums
gaming.stackexchange.com/users/3015/Rapida
I use the Soul Sand technique described by Zoredache, but you might want to carry food with you on your boating trips, because the Soul Sand dock sometimes glitches up and deals massive damage to your health, sometimes killing you in one hit (although food is pretty much worthless if that happens).
It seems like damage that would apply to a boat when crashing into other things, applies to you when crashing into Soul Sand.
gaming.stackexchange.com/users/11244/NeoRetro10K
I have found just getting out of the boat while it still has some bare minimum momentum and letting it slide out from under me to have perfect results, in that I don't bump it and have to chase it across the ocean :)
gaming.stackexchange.com/users/8581/James
You're not missing anything... happens to all of us.
Row to shore, so the front of the boat is touching land.
Then look down at the boat and right-click, as Jasarien suggests, and back out of the boat, so it is "pushed" towards shore.
It should barely move, if at all.
gaming.stackexchange.com/users/6547/Luke
I've found that boats are less likely to go shooting off into the distance if you get out of them where water is only one square deep.
It's not always perfect, but that, combined with looking straight down when you exit, usually prevents a boat from flying away and crashing into the shore.
gaming.stackexchange.com/users/8675/thedaian
Make a channel one block wide with dirt blocks and drive into it.
Not too easy, but effective.
gaming.stackexchange.com/users/10682/T1R1LL10n
I mean without it shooting off away from you in some direction. Maybe I'm just missing something, but every time I right click to exit a boat it seems to shoot off out into the water. I'd like to hop out on to the land next to me and have the boat stay put.  I know you can build elaborate docks with doors and such. But is there a way to just neatly get out of a boat without all that?
How do you get out of a boat in Minecraft?
gaming.stackexchange.com
<minecraft-java-edition>
gaming.stackexchange.com/questions/20267
gaming.stackexchange.com/users/8612/Matt
You have several options: row to shore so the front of the boat is touching land, then click on the boat and jump. You can also make a dock out of soul sand or with with dirt blocks and drive into it. Make sure to carefully exit  the boat while facing downwards and clicking right or making different kinds of blocks and bringing the boat close to the shore. Exiting as the boat is moving slightly may also work.
Right click and looking down while carefully jumping out of the boat is highly suggested. The boat is faced towards the shore. Creating blocks and leading the boat into it. Exiting the boat while having some light movement.