The peace treaty itself will probably not be 7 years. It is just in retrospect, in God’s clock, that that will be 7 years.
Whatever the supposed length, the confirmation shall be for one heptad.
Daniel 9:27 King James Version
27 And he shall confirm the covenant with many for one week: and in the midst of the week he shall cause the sacrifice and the oblation to cease, and for the overspreading of abominations he shall make it desolate, even until the consummation, and that determined shall be poured upon the desolate.