The Home key gets you to the top of the page.
The only time I've found a "Go to top" button useful is on infinitely scrolling web pages where some cleanup is done when you click the button.
If you do implement it, have it collect some stats, see how many people actually use it. I would be surprised if many do.
Jump vs Scroll
A smooth scroll can provide a "cinematic" effect. This is nice on certain types of sites/webapps. But if this is documentation, especially technical documentation, avoid cumbersome animation.
If it slows the user down, it should be avoided when your website's main purpose is productivity.
So while I don't see the button as useful, if you do implement it, make it jump to top.
Take a look around
Look at the documentation for similar products/services. If it's code, something like the momentjs docs are a great example. I can hunt for some different examples if you can be more specific about the documentation type.