Ending the war can only mean the elimination of Hamas. Hamas and Hezbollah have been very honest about their intention to destroy the state of Israel, so who are you going to talk peace with.
Hamas could end this current mess by laying down their arms and releasing all the hostages, but that would me admitting defeat and having to submit to terms of surrender. Hamas would rather everyone is Gaza was killed than to do this.