The profile need to be a closed Polyline first.
Go to Modify and then down to Join Polylines, select them and click finish.
It can be a good idea to check that the profile is closed, after join, select edit tool, select the profile and look at the right side down on the command line, if there is a symbol open there that will allow you to Close it click on that and og out from that place, later you can extrude your profile and get a closed Object, not only the "Fence"
It is a good rule in general to use close when you are finish drawing a profile, as even it you end your profile at same point that you started, it dont need to be closed, and by that not work like you want it.
V20, V21, 2015/ 16/ 17/ 18/ 19 Pro. Platinum
Deluxe 2015/ 16/ 19
Windows 10 Home Premium 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB