A body axle swap

If they are the same axle, yes, direct swap. If they are different pinion size axles, e.g., 7.25 to 8.75 or vise versa, then you will have to swap driveshafts as well.