
This passage gives two tests for the office of prophet: 1) If a person claims to speak in the name of another god, no matter how accurate his prediction, that person is not a prophet and must be put to death. 2) If a person claims to speak in the name of the Lord, but what he says does not come true, then that person is not a prophet and must be put to death.
But the words spoken by the prophets were not necessarily predictive in nature. Most of the prophet's message was forthtelling rather than foretelling. In other words, most of what a prophet spoke was God's message for those to whom he was speaking. This is not to say there is no benefit for the 21st century reader of such prophecies, but that the message made sense to the people who were physically hearing it. In other words, the message for us should not be 180° opposite (totally unrelated) to the message intended for the original audience.
In Jesus' day, when people read that God would raise up a prophet like Moses from among the people of Israel, that Moses-like prophet was considered to be none other than Jesus Christ himself. When we get to the book of Matthew, we'll see to what great lengths that gospel writer went to identify Jesus with Moses.