Preflop
I like isolating, but 4BB is way to small, when you are out of position against 2 limpers. I would go to minimum 6BB, and since its a freeroll, and stacks are deep, even larger sizes would also be totally fine. With your sizing you are literally begging them to come along and try to either hit something or use their position to outplay you after the flop.
Flop
Like your C-bet and sizing looks fine as well.
Turn
I agree with HP300GOD, that this turn should be bet for value. If he has KQ or KJ, he just picked up a gutshot, so those hands are not going to fold, and you also beat a worse two pair and some random A high, that floated the flop.
River
As played I would also bet for value, but it seems like, you went full pot, and this is way to much. Apart from a somewhat unlikely A5, all his two pair hands would have bet the turn when checked to, and any one pair hand is probably going to fold to such a substantial bet, when a flush is now also possible. So by going so large, you create a situation, where you mainly get action, when you are beat.
To make matters worse, you get raised, and this frankly sucks. You are getting 3:1, so you only need to win 1 out of 4 times, and I cant blame you for calling with top two. But the fact of the matter is, there are a lot of hands, that beat you on this board, and he is probably not raising with anything worse for value. So essentially you have taken a fairly strong hand and played it in a way, so that it has become a tiny little bluffcatcher.