Not so much swapping but more like building. As long as you have the right tools is is not hard to do. You will need an AR Barrel wrench, a holding fixture for the upper, and an accurate torque wrench, along with go, no go gauges. Remove the upper from the lower, remove bolt and carrier group, secure upper in a holding fixture in a solid bench vise. Remove handguard, gas block and tube as well as any comp or flash hider that may be affixed to the barrel. Useing AR barrel wrench loosen the barrel nut, remove it pull barrel out towards you. Mount to new upper in reverse, torque to 65 ft lbs in three stages 20, loosen 45 loosen then 65, loosen and retorque to 65. Turn barrel nut as needed to open gas tube hole. replace gas tube and gas block and any flash hider or brake that you want and handgaurd. reinstall bolt carrier checking headspace with gauges ( some folks don't think checking headspace is needed, but I am sort of old school about this) reinstall upper to lower, test fire ect.
This is all covered with pictures on arf com in the build it yourself section. Probiblly better than I explained it.