The Torah's "his days shall be 120 years" gets a full theological frame in Targum Pseudo-Jonathan on (Genesis 6:3).
God speaks by His Word: "All the generations of the wicked which are to arise shall not be purged after the order of the judgments of the generation of the deluge, which shall be destroyed and exterminated from the midst of the world. Have I not imparted My Holy Spirit to them, that they may work good works? And, behold, their works are wicked. Behold, I will give them a prolongment of a hundred and twenty years, that they may work repentance, and not perish."
The 120 years are not a lifespan cap. They are a grace period. God announces the Flood 120 years before He sends it. The entire time Noah will be building the ark, the generation is watching, and every day is a renewed invitation to repent. The Holy Spirit has already been given to them — they have the capacity for good works. They simply refuse to use it.
And one more promise: future wicked generations will not be destroyed this way. The Flood is unrepeatable. Whatever the consequences of later wickedness, they will be different. This is the Targumist's early pointer toward what God will later swear to in (Genesis 9:11): never again will a flood destroy the earth. The rainbow's promise is already being drafted here, inside the warning.