I agree; it sounds like you were too close to the knee. If you got a deep muscle hematoma, it can take a few weeks to go away. It will be sore, and swollen, and unfortunately not much you can do about it. It will go away on its own though, unless you have diabetes or other issues. See a doctor if in doubt.
Your gear isn't wasted if too deep, as far as I know. If you hit the bone, you'll know it. Been there done that! Just back out a half inch, go ahead and inject, and you're fine. Only problem would be if you stick yourself with too much force and hit the bone, you'd dull the needle and bend the tip over. If that happens, get a bullet to bite on, because you just created a fish hook which must now be ripped out, slicing muscle on the way. Ouch! But again, that doesn't happen unless you really jam the needle in, and nobody should be doing that. I've seen some bros take the "do it like you're throwing a dart" technique too literally, though. Just stab with enough force not to get hung up in the skin and muscle sheath. Not like you're blowing a concrete nail in.
Charles