Regular peonies are herbaceous perennials, which means they die back to the ground each year and are not pruned. Tree peonies have woody stems that remain year round. Japanese peony trees are naturally leggy. If you just cut back the branches, it may take several years for it to reflower, and then it will be leggy again.
You can prune tree peonies where the stem remains alive after going through the winter. Pruning the tree is not recommended the first several years because it needs to grow many branches. After that you may prune out the extra growth in the interior of the shrub.