No you made the wrong play. Horrible idea calling the all in with a K high straight there. You should never call all-ins with the nuts off the flop. LOL.
Uh are you serious?? Are you really asking if you made the right play?? If you don't know the answer by now, by yourself, then you definitely need to learn more about poker. A lot more.
KJ on a 9-10-Q rainbow flop. Hmm, what hand is the best possible hand here?? Uh, lets see, I think it's the K high straight. Wait, I have the K high straight. Huh, does that mean I have the best hand possible?? YESSSS!
OK, to the point, you have the nuts off the flop, if all the money gets in the middle there then there's absolutely nothing you can do, of course you have to call the all-in there. You got unlucky, nothing you can do; that's just part of the game. If you don't realize that that was the only play you could have made right there, and should have made without any hesitation at all, then maybe you should re-evaluate your game before playing for money anytime in the near future.