Running electric to treehouse from outdoor load center
If this tree-house involves children, I suggest you go another way entirely. 

Make it an experiment/exposition in off-grid solar technologies.  Use the most common voltage for smaller off-grid systems: 12V DC.    There's a lot of exciting stuff going on in this field.  It is highly accessible to children.  It engages them in STEM.  And unlike many "STEM projects, childrens' version", you get to work in the real magilla, with the same hardware the pros use.  The same design issues arise, and he gets direct field experience with them. So those skills apply directly to the solar/off-grid field. 

See?  This suddenly becomes worlds safer, and a whole bunch of Code and permitting issues just disappear!  

(well not quite. Code does have a thing or two to say about low voltage power systems. But violating Code in this area isn't going to get anyone electrocuted and probably won't burn your tree down.) 

If the system needs help, you could certainly add a 12V battery charger fed from 120V.  But you'd have flexibility to put that in a safe, code legal location.