"Do this thing which I have commanded you, and you shall prosper. Be faithful, and yield to no temptation.
Stand fast in the work wherewith I have called you, and a hair of your head shall not be lost, and you shall be lifted up at the last day. Amen."
These verses were originally directed to Oliver Cowdery after the. Lord told him to stop trying to translate. Oliver had just been asking God, but not studying or trying to figure it out on his own. It was a time-sensitive thing, so God told him to stop trying, and that he had strengthened Joseph enough that he could finish it. God knows, of course, that having an opportunity taken away, especially after finding out it was because of your own mistake, can be disheartening, and so he adds these verses at the end, reminding Oliver, and us, about what really matters.
We often don't want there to be consequences in life, at least for us. We might want someone else to get caught doing something wrong, so that person learns a lesson, but when it is us, we pretty much always want mercy, and to get off, at worst, with a warning. We want to be able to spend years off exploring forbidden paths, and then suddenly upon repentance to realize that we lost no progression along the Lord's path. The truth is both amazingly merciful and hard to accept... God will cleanse us and purify us completely if we truly repent and change our hearts. He will accept us back into his arms like the prodigal son (Luke 15:11-32), and though our sins were as scarlet, they can be white as snow (Isaiah 1:18). But being perfectly clean and forgiven doesn't erase the opportunity cost of walking in a different direction. We, as prodigal sons or daughters, don't automatically get all that money and time back that we wasted. We might miss some opportunities like Oliver did, through misunderstanding or inaction. And we might not be as far along the path as we want to be if we spent a lot of time going in a different direction. That part is hard for us. We don't want to lose anything, and we are pretty attached to whatever future we had already planned out.
No matter the opportunity cost of past choices though, God reminds us here that the future is always waiting for us, still ripe with opportunity. Instead of mourning missed chances, we can go forward. Always, if we follow the commandments, we will prosper. We still can gain salvation and eternal life... and those are the things that truly matter. God always has a plan. We might have to let go of some things we lost in the past, but God has plans to give us a glorious future. Let's let go of past regrets and have faith in him, knowing that he will always lead us to happiness.