Joshua has almost finished the job Moses started. The 12 tribes are in the promised land. He read God's law to the nation of Israel. He is ready to retire. The only thing he was not able to accomplish was the complete elimination of the pagan Canaanite and Amorite cultures, which worshiped Baal and Moleck. Joshua does give a final warning to not get involved with or marry into these peoples. He repeats Moses' curses that will come if the Israelites fall away from God and adopt the ideas and practices of the pagans. His "tag line" is one of my favorite verses (Joshua 24:15):
"Choose for yourselves this day whom you will serve...but as for me and my house, we will serve the Lord"