No, that nut holds the upper triple clamp down.
you need to support underneath the lower triple clamp (headlift stand is best but there are other ways to support), and loosen all 4 bolts that hold the fork tubes and align everything.
You may also need to loosen the axle pinch bolt & axle to realign it, and then the handlebars.
(depending how bad it is.)
Unless you are 100% confident and good on the tools- its a dealer or experienced persons job.
Ive actually fine tuned my bike from factory to make it run straight and true as they are never perfect.