Your answer is so much more informative, and not one bit as silly as what I was tempted to post.:grin2:Depends what is wrong with it.
Cam chains, tensioner and guides are about $700 in parts, another $400-$600 in labor.
Removing the engine and replacing worn parts for low compression or oil leaks is around $1500 in parts and another $1000 in labor. Once you refresh the top end, you MUST also address the crank, crank journals, wrist pins and other connectors in the bottom end which is usually about another $1000 parts & labor (if the crank can be machined. If not, that's another $600 alone).
Which is why most people A: Do not rebuild these engines or B: pick up a used engine from a salvaged bike and have it installed.
Used engines will run from $900-$1500 depending on the year and accumulated miles. If you swap it over yourself, it takes a few hours and requires several floor jacks. If you pay a shop to do it, they usually charge $500 to do the job.
The underlying engine block is the same from 2001 to 2019. What changed is the charging system and the upper cylinders. If you want plug and play, you have to get a 2005-2008 C50 or M50 engine. If you don't want to be limited, you can get any year and swap the stator, regulator, coils, cylinder heads and intake, along with the needed electronics.
You've got some options, but nothing is really cost effective when you consider the resale value of the bike.