Hi, welcome to the forum. Glad you joined. Hopefully we can give you some help.
How to humanely kill a chicken has been discussed a lot on here. We all have our methods and opinions but to me there is no one way that suits us all. In my opinion, the best way is the way you can. Let me explain that. You want the kill to be sure and quick and you don't want o hurt yourself. Closing you eyes or flinching at the wrong time or only going part way could cause problems. You need to be able to go through with it. We all have different experiences and tolerances. What works for me probably won't work for you.
My understanding is that you want to kill it in a way that you can eat the meat. Some people on here may find it critical that you kill the cockerel in some certain way to enhance the meat quality or you wait to maximize the amount of meat you get. To me that is all irrelevant in your situation, You are not raising them for meat or trying to cook a gourmet meal. You have a behavioral issue you want to take care of now, you don't want the meat to go to waste, and you don't want the cockerel to suffer unnecessarily. The reality is that as long as you don't poison the meat you can eat it. and you can eat any chicken of any age or sex.
If you can, an easier way to solve your problem may be to give him away or try to sell him. Let someone else deal with him, they may be glad to have him. I don't know where you are located so I'm not sure what methods might be available to you. If you are in the USA, many people use Craigslist for this. Other countries may have something similar, an internet system to buy, sell, or trade with your neighbors. Perhaps you could talk to the people at the feed store, they might know someone but more likely they will let you put a notice on a bulletin board. If you can find your state or country thread in the "Where am I? Where are You!" section of this forum you can chat with your neighbors.
There are a lot of different methods I consider humane as long as you can follow through with them. You can find U-Tube videos on many of them which can be a big help. I use a hatchet and stump method. I drive two large nails into a stump to form a Vee, put the head in that Vee, and gently stretch the neck out to give me a good still target. You may not have a stump or something like a hatchet, ax, or meat cleaver you can use. I generally do not recommend this method unless you are comfortable you can hit the target. Also, you need to chop into the end of the stump so you are cutting into the grain, not across it. Otherwise the blade may not sink in enough to get a clean cut. Using the flat side of a 2x12 piece of lumber usually does not work well.
Many people use a killing cone method. At his age you can make something out of a bleach bottle or milk bottle. Cut the bottom out and make sure his head can reach through the bottle top. Hang it up somewhere, then using a sharp blade cut the throat. Or use pruning shears or loppers to cut off the head. I don't use this method so I won't try to go into details. Instead of a cone some people hang them by their feet without a cone.
Another method I haven't used is the broomstick method. You put the head under a broomstick or something similar, stand on the broomstick to hold it down, and jerk or pull on the legs to break the neck. Again I can't give details.
Another method I used growing up on a small farm is the wring the neck method. Take the chicken's head in your hand and swing the chicken around over your head a coupe of times to build up speed. Then vigorously snap your wrist. That breaks the neck. Sometimes the head can come off in your hand. As far as being able to eat the meat that is not a problem.
There are other methods if others want to mention them. When you kill the cockerel he will almost certainly flop around a while. In my opinion as long as the nerve connection from the brain to the body is broken that's just a muscle reaction to that connection being broken so the nerves are no longer sending signals to the muscles. That can still be hard to watch so prepare yourself.
Any of these methods will appear cruel or barbaric to some people. In my opinion as long as they are executed properly they are not. The chicken doesn't suffer unnecessarily but they can be hard to watch. That's why I started off suggesting you consider letting someone else deal with it. But there is another side to this. Part of animal husbandry is to make sure an animal does not suffer unnecessarily. If another chicken is injured or becomes so ill that it is just plain suffering the humane thing to do may be to end its suffering by ending its life. I hope you are never in that position but it can be a very difficult decision to make. Knowing how can be a help.
I hope this helps you some. I've tried to not pull any punches but give you what I consider realistic information. If you have any specific questions let me know. If I can I'll try to help.