Passage
And Joshua said unto the people, Ye cannot serve the LORD: for he is an holy God; he is a jealous God; he will not forgive your transgressions nor your sins.
And Joshua said unto the people, Ye cannot serve the LORD: for he is an holy God; he is a jealous God; he will not forgive your transgressions nor your sins.
Joshua 24:17 For the LORD our God, he it is that brought us up and our fathers out of the land of Egypt, from the house of bondage, and which did those great signs in our sight, and preserved us in all the way wherein we went, and among all the people through whom we passed:
Joshua 24:18 And the LORD drave out from before us all the people, even the Amorites which dwelt in the land: therefore will we also serve the LORD; for he is our God.
Joshua 24:19 And Joshua said unto the people, Ye cannot serve the LORD: for he is an holy God; he is a jealous God; he will not forgive your transgressions nor your sins.
Joshua 24:20 If ye forsake the LORD, and serve strange gods, then he will turn and do you hurt, and consume you, after that he hath done you good.
Joshua 24:21 And the people said unto Joshua, Nay; but we will serve the LORD.
The verse centers on "transgressions", "joshua", "said", "people", "serve", "lord", "holy", and "jealous". It is saying that the verse draws attention to "transgressions" and "joshua", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 18's "And the LORD drave out from before..." into verse 20's "If ye forsake the LORD and serve...", so "transgressions" and "joshua" belong inside that flow. In Joshua context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "transgressions" and "joshua" with trust shaped by these words, not by a vague optimism outside the passage.