I think its a bit hard saying what is the most important charity, considering, charities play an important part in some ones life.
As for the building of the church, I can see what you mean by it being selfish, when you think of all the other charities that are struggling, but for me it depends. I mean, in some communities don't churches offer other services as well? like free counselling and stuff, youth activities and the like? I can't remember what exactly, but I know there is one church in my area that offers stuff like that. So, I guess it's what else that church is offering the community and if it's offering something else that the community doesn't have. It would seem selfish and a waste if it wasn't offering benefits to the wider community.
So if I had a million dollars, I'd probably be selfish and help those charities that help myself or my family at one stage, surf life saving clubs, make a wish foundation, cancer council.