Learning high-dimensional probability distributions using tree tensor networks