Hopefully this code will lead you in the right direction.
//get a reference to the tree
var tree = dnn.controls.controls['ctl00_ContentPlaceHolder1_MyDNNTree'];
//find xml node using xml DOM lookup
var node = tree.rootNode.findNode('n', 'id', id);
//call tree's expandNode method passing in reference to TreeNode
tree.expandNode(new dnn.controls.DNNTreeNode(node));
One thing I want to caution here is that the new controls will no longer use XML and therefore some of the underlying methods calling the XML DOM will not work when upgraded. However, the code above will work, as I have spent some time making sure common scenarios will still function. If you wanted to do it the "new" way, this is what the code would look like.
//use BehaviorID assigned to Find tree
var tree = dnn.controls.find('TreeBehaviorID');
//call findNode passing in only id of node your looking for
var node = tree.rootNode.findNode(id);
//call tree's expandNode method passing in reference to TreeNode
tree.expandNode(new dnn.controls.DNNTreeNode(node));