Assuming the 2007 Avalanche is like a 2007 classic truck, and uses the 2003-2007 wiring, it won't be that hard.
However, in most states, it wouldn't be legal. You can only swap in a motor of the same year as the chassis, or newer. So check your local vehicle code and emissions laws first.
Sent from my FlashScan V2 using Tapatalk