Each branch has a single Y value so you can sort the Tree Statistics ‘P’ (Path) output by that Y value, then construct a new tree using Tree Branch, as I did just ten hours ago here:
If you had posted your points I would use them to show you, With only a screen shot, advice is the best I can do. Here is the relevant portion of that code: