If what you’re asking is can purity of heart be regained, the answer is yes. This can be difficult however, given that even when we are clean before God, we tend to recall our sinful nature and particularly our past and past deeds. So even if we are pure of heart, it’s an uphill battle to stay that way, especially for those who have fallen before and know what it feels like to be unclean.
Sometimes it’s a matter of forgiving yourself when responding to God’s call to be pure of heart. If you’re doing right by God and yourself, why should it ever be too late? God can always restore what is broken and renew what sin has undone.