Preflop
I like raising obviously but I hate, that you just made a min-raise. This is leaving so much value on the table, its not even funny. The guy has position on you, and he is not going to fold, just because you make it a decent size like 4-5BB.
Flop
Why are you not betting this flop? The guy limped preflop, so you have no reason to assume, he will do your betting for you. By giving up the initiative you hand him the keys to the hand and let him determine, how big a pot he wants to play. Please just make a standard C-bet and go from there.
Turn
Now you check-raise, and this is also totally weird. Preflop and on the flop you played extremely passively and failed to build the pot. Now on the turn your hand is worse, since more
hands got there, yet now you turn up the aggression and almost overrepresent your hand.
River
This is the only street, you played well in my opinion. If he can have K4, he can also have K5, K6, K7 and so on, so this is a clear valuebet, and your sizing is fine.
Results
You played this hand poorly, but at the end of the day it was just a bad beat, and even if you had played it perfect, you would have lost the same amount of chips. The worrying thing is the way, you frame it. "Guess I should have jammed the flop". No. You should not have jammed the flop. The goal in poker is not to win the hand, the goal is to win chips. And you win chips by making normal bets for value, when you have a strong hand like an overpair. Its great to get drawn out on on the river, because it mean, you were ahead and generating value.