That had more to do with failure to keep the Sabbath for the Land than anything to do with morality.
Actually, God judged Israel because they did not keep the Sabbath rests, which were to be every 7th year, in which the land was to be allowed to rest, debts were to be forgiven, slaves were to be set free, etc. They functionally kept the Sabbath, but only in form, and not with their heart. The reason they had 70 years of bondage and dispersement to Babylon was because the the 70 Sabbath rests they had never kept from the time they entered the Promised Land, as God had told their leaders. Daniel explains this.