from past experience if you have mechanical ability put in another engine in good condition your self.
parts and labor alone will cost you more in the long run than a used engine put in a bike. parst for an engine are not cheap and if you blowing smoke it is atleast rings, with likely scored cylinder walls. so if your lucky you can have them honed to high limit of the tolerance or bored and sleeved, but best option would to have the cylinders replaced. so you need new head gaskets, rings, cylinders, possibly a piston, rod, crank, the list goes on and on if you had an oiling problem. You could also have a valve problem but cannot tell from info posted.
so at $90 an hour to pull the engine apart, buy the replacement parts $$$, check out ronayers.com to get an idea of what a cylinder, gaskets and ring kit s cost, and put it back together you will likely be well above the cost for a used engine put in the bike. i left out the cost to remove the install the engine as that costs will be there no matter what route you take if the dealer is doing the job.
Not sure of cost on ebay but i would think any of the 650 engine would fit but not 100% sure. It is alot easier to standardize parts for kawi by making one engine case the same for 3 differnt bikes.