2x4 rectangular tube should be available from an aluminum supplier.
I've never bought anything that was pre-capped. Capping one end is not difficult. I knew guys that cut the cap 1/16 shy on all four sides, leaving a tiny step when the cap rested on the top end of the tube. Then they placed four very tiny welds at the corners on the little ledge. "Show-off" welders.
My preference is to glue a cap. It can fit inside the inside dimension of the tube if you cut carefully, or sit on top flush with the outside of the walls (any overage can be filed or sanded off). Either way, you can support the cap with two pieces of angle glued to the inside walls and the underside of the cap.
On some square tubes I have found that some sizes of u-channel will fit snugly in the inside dimension. I put a little glue on the inside walls of the tube and then tap the u-channel piece into the end, legs down, till it's flush with the top.
Brad in Kansas City