You may need to remove the gas tube and loosen the barrel nut and rotate the barrel slightly to the right to true up the alignment and retighten the barrel nut to correct this. The barrel can slightly rotate as the nut is tightened and this will cant the front sight slightly.

What kind of Front Sight Base (FSB) do you have???
There are several kinds out there, but here are the most common:
1.) Taper Pinned. These are slightly conical shaped pins. The front sight base and barrel are aligned, drilled, and these conical pins are driven in from right-to-left. (from the shooter's perspective) To remove these pins they need to be pounded from left to right. On older barrels (Vietnam Era Surplus A1's, etc.) the taper pins eventually get so hot from years of prolonged use they can actually FUSE with the barrel & FSB. They cannot be removed unless drilled & pressed out.
2.) Allen/Hex Bolted. These are typically found on ArmaLites, gas blocks on match grade barrels, or low profile gas blocks. But some front sight bass are actually allen-bolted on.
3.) Roll Pinned. Some barrels have an FSB that is actually roll pinned in place. It's similarly drilled into the FSB & Barrel, but only held in place with a simple cheap roll pin. They're quite flimsy.

Don't just go WHACKING at your frickin' FSB when it's locked in a vise!

First, check the proper alignment of everything. Eyeball it for a general idea, but then use the previously mentioned fixture to assess what APPEARS to be out of alignment.

THEN, lock your upper into an upper receiver vise block, and then lock it into a workbench vise. Use a barrel wrench tool to remove the barrel nut (assuming this isn't a free-floated barrel). Check how your barrel is inserted into the upper receiver. If you built this yoursel, using some of the cheapest parts you could find, sometimes Upper Receivers are machined a little 'out of spec'. (You'll find non-spec parts from all manufacturers, but some put out more than others) What you're looking for is the NOTCH in the upper receiver where the barrel extension has a 'dimple' or a round 'pin' looking part that fits into this 'Notch' in the upper receiver.

Sometimes the notch in the upper is machined slightly off-center - this can be found in some uppers made by DPMS, ArmaLite, and other smaller 'off' manufacturers. Check whether that notch is PERFECTLY VERTICAL in the upper or not!

Sometimes the 'Notch' in the upper is machined a little too wide (out of spec), allowing the barrel to 'rotate' a little in the upper receiver since the pin/protrusion on the barrel extension is able to move sideways in this 'notch' of the upper receiver! How much 'play' is there? If there's too much 'play' in that area, when tightening the barrel nut, sometimes the barrel may rotate slightly off center/vertical... You may just need to re-align the pin/protrusion in the upper receiver's notch so that the front sight base is in perfect vertical alignment, then CAREFULLY re-tighten the barrel to the upper.

Similarly, check whether the 'pin' or 'dimple' sticking out of the barrel extension (near the chamber area of the barrel, with teeth to engage the locking lugs of your bolt) is in perfect alignment of the front sight base (they should both be perfectly vertical).

Once you've done this, you should be able to tell which part of the gun is 'off'. If it's the FSB in relation to the barrel / barrel extension pin/protrusion, or if it's an out-of-spec upper receiver notch, or perhaps when you first assembled the rifle, you didn't use a torque wrench properly connected to your barrel wrench, over-tightened the barrel nut, and the torque bent/tweaked/damaged your aluminum upper receiver causing the barrel to point off to one side or another.

These things happen.

If the FSB is out of alignment with the barrel extension protrusion/pin, there's a couple ways to fix it. One is the 'Proper' way to fix it, and one is the 'Quick' way to fix it, but it's somewhat of a 'Bubba-Fix'...

Certainly it's a FAR BETTER method than grabbing a 'BFH' Big F(_)cking Hammer and WHACKING THE HELL OUT OF IT like an ignorant f(_)cking monkey!!!

The 'PROPER' way to fix it is to pound out the Front Sight Base Taper Pins (or whatever pins/bolts are used), straightening the FSB perfectly vertical in relation to the Barrel Extension Pin/Protrusion, then either tightening the bolt, or Re-Drilling the pin holes! WITH THE PROPER DRILL BITS! Either a tapering bit (if it's taper pinned), or a standard drill bit if it's cheaply roll-pinned in place.

The 'Quick Fix' is to note which direction/side the FSB is 'leaning' and CAREFULLY file away a little material from the upper receiver, which will slightly 'Widen' the NOTCH (don't file it deeper, just slightly wider). Then put some ANTI-SEIZE GREASE ON THE THREADS OF THE UPPER RECEIVER (even some crappy manufacturers (not gonna name names, *COUGH* ARMALITE *COUGH*) they skip this step, but it's essential). Then when tightening the barrel to the upper receiver, you're going to need to VERY CAREFULLY ENSURE IT STAYS VERTICALLY ALIGNED WHILE TIGHTENING IT. Use a torque-wrench to ensure you're not over-tightening the barrel nut and accidentally bending/damaging the upper receiver.

That takes care of the fixes if the FSB & Barrel Extension pin are slightly out of alignment. Next time buy a better barrel from a better manufacturer.

If the notch in the upper is already a little 'too wide', check if simply rotating the barrel within the wide notch will help correct it a little bit, and tighten the barrel nut CAREFULLY as stated above.

This should help you determine what part(s) are at fault here for the misalignment. If it's a damaged upper, buy a new one, and use a torque wrench next time.

It may also be possible that the barrel itself is bent - sometimes manufacturers of 'Featherlight' or super light-weight skinny barrels will sell barrels that have been accidentally bent somewhere in their warehouse or in shipping. In that case buy a new barrel.

I hope this info helps keep you from bashing away at your barrel like it's some kind of Kalashnikov

iNuhBaD, I got a laugh out of you enthusiasm. Thanks for posting the correct method. I bought Walt Kuleck's Complete Assembly Guide, so NO, I did not bang away with a bfh on a thousand dollar rifle. AK = hammer. AR = no hammer.