Depends on how "blown" it is.
Cheapest solution is probably to find a junkyard engine. The Avalon shares it's engine with a bunch of Toyotas, the most common being the Camry.
Second best solution is to look at a certified rebuilt motor...sometimes you get a slight discount when you return your "core" motor.
Here is what wiki says about the MZ.
http://en.wikipedia.org/wiki/Toyota_MZ_engine
Have you ever dropped in a motor? The toughest part is keeping track of all the wires and hoses and not damaging any of them. A little tape and labels helps, as well as a digital camera to document everything you remove.