Problem rotating and flexing leg

I have been practicing yoga for 4 years but I have never been able to do padmasana. Whenever I try its very painful, and I am not sure what the problem is or how I can stretch properly.

The main problem is once I bring the heel to my thigh, I can’t lower the knee. Whenever I try to do it, I feel pain in the frontal part of my hip where the leg meets the hip bone. The pain only irradiates a little bit into the thigh, but my knee doesn’t hurt.

This doesn’t happen in Baddha Konasana. My knees touch the floor smoothly and pain-free.

The problem is when I [B]rotate[/B] the leg and flex it for padmasana. Which explains why no amount of Upavista Konasana has helped me stretch properly.

What is the problem? is it my bone structure? a ligament? a muscle? what asanas can i practice for it?

Information about your knees relative to the floor in baddha konasana is not germane without also knowing if your heels are connected to the pubic bone in that pose.

My heels are not totally connected to the pelvic bone, but about 1.5 inches away.