For general purposes, you cannot be 100% sure. If you try the wrong key, you will get a bag of random bits. Those random bits may look like something valid, but they are still the wrong key. Monkeys at a typewriter punching out a few lines of Shakespere, and all that.
In theory you could design an encryption algorithm which intentionally lets you know when you get it right. It would involve adding a block of known content to the message, and verifying that that block is correct when decryption it. However, you would need to avoid the monkeys at a typewriter problem of random chance happening to decode that block correctly. You would have to tailor the encryption algorithm and the block of data itself so that you could prove mathematically that no key besides the correct key achieves a match for that block.
Typically this sort of behavior is considered to be a vulnerability in the encryption algorithm, so you don't see it. It's just too risky to try to add that much provable behavior into your algorithm. Consider the example of the Enigma, where they found that some output patterns simply couldn't occur due to the layout of the rotors, which was a major factor in the breaking of Enigma. You would have to intentionally choose an encryption algorithm that has a similar vulnerability.