The book of Ezekiel is thought to contradict the book of Deuteronomy. However, in reality both are in agreement. In the book of Deuteronomy god says that he loves his people but he will also punish them if they are disobedient. In the book of Ezekiel, he says that he does not like punishing his people.
In essence he means that he will punish the disobeyers but he doesn’t like doing it. Hence, it is a sentence that is misread and misunderstood as though god will not punish the disobeyers. Therefore, the two books are in agreement with one another.