The recent JAMA only says that Vitamin D does not help with depression. On the other hand, it seems to be useful in preventing respiratory infections, see the following for a review of randomized studies https://doi.org/10.1136/bmj.i6583 .
Depression is a tough thing to treat. The amount of treatments that show promise, but essentially don't make a meaningful difference in RCT's is very, very large.
(Perhaps not coincidentally, placebo effects in depression are known to be large).