Howdy
I bought my Model 17-3 brand-spanky new in 1975.
I must admit that in all those years I have never taken a close look to see it the barrel rib is precisely lined up with the rib on the frame. I just looked today. Yes, it is perfect. Any slight apparent misalignment would be caused by me not getting a photo perfectly perpendicular to the gun.
The pin in the barrel allows several degrees of rotation. The shoulder of the barrel snugging up to the frame is what locks the barrel in place.
Any competent gunsmith or S&W Armorer could fix that.
As has been stated, that revolver has a pinned barrel. At the factory, once the barrel was torqued in place, a hole was drilled through the frame and the barrel and a pin inserted. I must admit I have never heard that the pin will allow several degrees of rotation. If that were true, why bother to pin the barrel at all? Your barrel was clearly over torqued a bit before the pin was installed. In my perhaps incorrect opinion, the only way to line up the barrel perfectly would be to machine away an entire thread pitch off the shoulder of the barrel and retorque the barrel until the rib lines up perfectly. That will shorten your barrel by one thread pitch, what ever that is. The new shoulder would also have to be threaded the appropriate amount so the barrel can snug up against the frame. The forcing cone would also have to be machined down a proportionate amount to get the barrel/cylinder gap correct. This was done on a dedicated fixture at the factory that lined up the barrel so the correct length could be machined off the forcing cone to provide the correct barrel/cylinder gap. Once this all has been done, a new hole will have to be drilled through the barrel for a pin.
I suppose given enough money, anything can be done. If you could find a smith capable of doing all this, I suspect it might cost more than you paid for the revolver. All the operations I have described were routine at the factory when your Model 17 was made, so a number of revolvers could be processed at one time. You are going to have to pay a smith to set up and do each of these operations for one revolver, which will be more expensive than amortizing the cost over several revolvers.
For a short moment I thought I would go through all my Smith and Wesson revolvers to see how well the barrel ribs line up with the frame. Only thought about it for a minute or so before I decided I would not bother.
What the heck, here is my Model 14-3 from the same time period. Ever so slightly off. No where near as bad as yours. But these photos should give you a fairly good idea of what was leaving the factory in the 1970s. No, I am not going to go through any more of my other Smiths, way too many.