Moses instructs the people to be aware of false prophets. Even if they had previously given prophecy that came true, they were not to be believed if they suggested that Israelites should serve other gods. As a matter of fact, if the false prophet attempted to lead the children of Israel into idolatry, they should be killed.
Even if a close family member encouraged an Israelite to serve a false god, then they should be killed as well. Further, if corrupt men enticed a city to serve foreign gods, then the entire city was to be burned to the ground. Then God would show the nation mercy. In the beginning of chapter 14, God also prohibits the people from cutting themselves or shaving their heads for the dead.
The admonition not to accept the enticement to idolatry is a no-brainer. The children of Israel were always commanded to avoid idolatry. However, as they were about to enter Canaan, the temptation to serve idols would be even more severe, as the people of Canaan all served false gods. Therefore, those who started serving idols must be killed for a few reasons: to avoid further spread of idolatry, and to show that idolatry is absolutely unacceptable. Idolatry is not allowed!