Hi Ulisses, you probably want to use Edit > Trim to cut the cylinder then select the face and extrude that rather than extruding a curve.
If you extrude a non-planar curve it won't have its ends capped automatically as you will get with planar curves but if you extrude a face or an individual surface that will get a cap by copying the base surface to the end of the extrusion.