Avengers couldn't fail, because of the five-year marketing plan. That's why Whedon glommed onto it.
1. Really? Avengers couldn't fail? You do realize that if it had ONLY made, say, 300 million at the box office, that would have actually qualified as failure, given the film's huge budget? Wait, look who I'm talking to.
2. Putting aside the fact that you have no idea why Whedon wanted the job in the first place, it ultimately doesn't matter what his motivations were. Somebody had to give him the job and that person, I can pretty much guarantee, didn't give a damn why Whedon did or did not want to do The Avengers.