These verses are part of a longer consideration of prophecy in Deuteronomy that runs from verse 9 through verse 22. It falls most naturally into three sections:
15 The Lord your God will raise up for you a prophet* like me from among your own people; you shall heed such a prophet.* 16This is what you requested of the Lord your God at Horeb on the day of the assembly when you said: If I hear the voice of the Lord my God any more, or ever again see this great fire, I will die. 17Then the Lord replied to me: They are right in what they have said. 18I will raise up for them a prophet* like you from among their own people; I will put my words in the mouth of the prophet,* who shall speak to them everything that I command. 19Anyone who does not heed the words that the prophet* shall speak in my name, I myself will hold accountable. 20But any prophet who speaks in the name of other gods, or who presumes to speak in my name a word that I have not commanded the prophet to speakthat prophet shall die.
New Revised Standard Version Bible: Anglicized Edition, copyright © 1989, 1995 National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved worldwide. http://nrsvbibles.org