To reliably get vitamin D, take a supplement. Exercising outside is more fun than a gym, but it won't make you any healthier than doing the same thing indoors.
Editing now to clarify, thanks!
1) They are completely anecdotal. "This worked for me, so it applies equally to all 7+ billion humans on this earth!"
2) They assume that everyone lives in the same climate and/or lives in a similar region. e.g. How are you supposed to 'connect with nature and the sun' when you live in Alaska and it's dark 6 months out of the year? How are you supposed to regularly 'connect with nature' when you live in the middle of a metropolis?
2) I'm not assuming anything. Alaskans can snowmobile or dogsled.
Stop making excuses and go outside. You will thank me for it.