IF is is piston slap you; measure current bore size, order an overbore piston, take the assembly to a machine shop and have them bore to the piston size, chamfer the ports, and hone the assembly. Reinstall...ride happy.
There are a few more things you need to check before you go buying a new piston already. The first thing you need to do it make sure you don't have any loose nuts. base nuts or head nuts. Anything loose on that top end can cause bad things to happen and even worse noises to form.
The next thing you can do is remove your headpipe and see if there is something stuck inside of it. You'd be surprised what can pass straight through a 2 smoker without harming anything but can drive you to fits with noises being made.
While the headpipe is off you can use a compact mirror to look back up the exhaust port and see if the piston is gouged. If those things look ok, take the carb, intake, and reed cage off and see if anything is wrong with the intake side of the piston. If there is nothing apparent on either side of the cylinder and you are SURE it's coming from the top end, pull the jug off and have a look see inside
Some things that can cause knock from the top end: bad wrist pin bearing, excessive piston clearance, broken piston skirt, slipped wrist pin retainer clip, gouges in the bore, or a snagged ring.
Some of those will require replacing/having worked on most of the top end components and almost all would say don't put the top end back down without replacing everything just to stave off any disasters later on. If anything in there looks real nasty, better off to do a complete top end rebuild while you have it off.