That depends on the bonsai itself. How long has it been dead? Where was it kept? Is there any growth? I would personally bake the tree at 250-300 while...and i stress this...STARING into the oven to ensure no smoke or burning, for at least an hour and a half, if not longer. Max 3 hours but the goal is to get all moisture out of the tree.
Did you buy it from an aquarium store? If you did its likely already dried and ready for aquarium use.
I thought you just had a bonsai die and were like hey now thats its dead can i put it in the tank.
Its hard to tell but. One of the signs is the softness of the wood. like youre able to dig a junk of it out with just your fingernail. If its super soft its likely not all that dry.
The method I use but I assume would be rather difficult with a bonsai tree is to cut into the thickest part of the wood and observe for anything green or moist.