the 230 wouldnt stand a chance against the kdx. It might get close to a raptor but the raptor would be faster. If you want to keep up with friends you should get a 250f mxer. If you are looking for a used one 01-03 then yeah get the yz250f. If you plan on getting new get any 250f that feels comfy. Well, that depends on your hight, weight, age (to see if you will be growing), and experience with dirtbikes.
The 250f is a four-stroke so it will have bottom end power for trails and you can go on "lugging" it. I recomend the YZ250F over the other ones because i believe it is the most powerful, reliable, and easiest to maintain.
Just my opinion.