Please consider checking your stance structure and posture by working from the center out and down to your feet. Kokutsu is hard because you need ankle flex and tons of leg strength.
Make sure your tanden is sucked up and forward slightly. Use your stomach muscles to pull your butt under you. Keep it there for all stances. I always have a slight flex or tension in my lower abs.
Next, check your weight distribution. About 30% front 70% back (about)
I do place some pressure on the balls of my front foot and pressure on my entire rear foot. Also, your back stance should be as long as your front stance. Make sure your feet are correct. The outside edges are perpendicular not the inside edges. <-- This might be why you have knee pain.
Another index to check is the rear heal, knee, hip, and should are all in the same plane. This allows me to make a coil (torque) as I drop or sink into the stance. Screw your self into the floor. Another index is my belt sits on the top of my back leg. It should not hang in the middle. Sit on top of the back knee. You should be able to see your foot if you look down (your knee blocks the view.)
Try 1 legged squats in bare feet. This does not include your regular training. Self train. Grab the floor with your feet. Think about using all the muscles and tendons in your leg. Your foot is flat to the floor. Start with 3 to 5 per leg. Another exercise that is more suited to Shotokan training is start in nekoashi-dachi and switch to kokutsu-dachi (same side) 100's of them both sides.
Holy smokes. If you google search "kokutsu dachi" I see an image of Kagawa Sensei. Does your back stance look like his? It's a thing of beauty. Note his foot, knee, hip, shoulder -- same plane. Search this "Kagawa Karate Kokutsu Dachi" That stance is picture perfect in my opinion.
Thank you. And good luck.
(This thing doesn't have spell check...look out) Thank you mattm!