I do not believe there is any way to connect Matt 24:14 with the two witnesses of Revelation. This is merely pure speculation. I think it is more appropriate to assume that the preaching of the gospel to the whole world will be the spread of the gospel message throughout the world due to the efforts of God’s people up until the time of the end. Some have interpreted this scripture that we may hasten His coming by getting the gospel message out to the entire world.