A Buffalo church has entered into an agreement with the city to buy land for planned townhomes on the East Side.