\$\begingroup\$

From core, the spell Tree Shape (Druid 2, Ranger 3) works:

By means of this spell, you are able to assume the form of a Large living tree or shrub or a Large dead tree trunk with a small number of limbs.

Some more flexible options are polymorph, more powerful versions of polymorph e.g. shapechange, and a 12th level druid's wild shape ability. All would let you assume the form of a tree, but unsurprisingly the less flexible tree shape is both lower level and has a longer duration.

If the player wants to be an ambulatory tree, then either the polymorph spells or the wild shaping of a 15th level druid would let you become a treant. There might be smaller ambulatory trees not in the SRD; the Huge size is a limiting factor for wild shape.

It's possible that, by first becoming a large enough tree, a druid could use live oak or even awaken on you.