Hopefully you can turn it to a point where the old stud can be knocked out & a new one angled in through the hole. It doesn't need to be straight in there until you're pulling it into the hub. They can often be tapped into place when you match splines with the hole, lug nut will pull fully tight when the wheel is installed.
You'd have to remove the knuckle & press that hub out of the bearing if you can't find clearance. Trying to bang or yank it out & you'll be pulling it for new bearings soon IMHO.
I'll move this to the Brakes, Suspension & Chassis area for you.