I won a Glock 17 barrel. It's an Agency Arms TIN coated "competition" barrel. I honestly cannot tell if it shoots better than the stock one. It retails for $300+ and I wouldn't pay that for it. Thank God I won it for only $40 in tickets otherwise I'd be upset paying $300 for no 'significant' difference.
I have no clue about your experience with firearms: how long you've been shooting, how many firearms you have or how often you are at the range practicing.
I would definitely do some 'dry fire' drills to see if you are jerking the trigger or making some fundamental mistakes that could translate to inconsistent shots.
Safety first... Make sure you're 110% safe with no ammo even remotely around you. Put a penny on the front sight and practice dry firing. If the penny falls off, then you need better grip, consistent trigger pull practice and things like that.
If you're at the range with a friend, have them load some snap cap / dummy rounds in a magazine and have them give it to you. You will pull the trigger and every so often one won't bang... This will tell if you're anticipating the recoil and pulling the gun in a certain direction.
Wash, rinse repeat and you're barrel will suddenly be working better for you.
I have a friend who hates his Springfield XDs. He said it's not accurate. Finally went with him to the range and his technique was all over the place. He brought a couple firearms with him that day. Now I'm no dead-eye by any means but when I tried his toys out they shot where I aimed them.
What I found is that having numerous pistols is great and all ('merica) but can hinder your accuracy. Having to remember all the nuances of one platform and then pick up an entirely different one can make a big difference. "Oh, the magazine release is here", "this gun has different sights that aim like so", "oh man this gun has a mechanical safety and that's why it won't fire" and stuff like that.