As far as I know the answer is yes. If you look at aftermarket barrels there are no Gen specific models I have come across. I think the only differences in the upper is the actual hole dimension in the nose for the guide rod. And from what I have seem and run myself there are bushing kits to bush the Gen 4 size back down to the Gen 3 size.
But back to the barrels, should have no issues, I have a Gen 3 that has a S3F Barrel in it and have a Gen 4 G19 factory barrel in the US for when that gun goes there.