Stop masterbating and give it some time. Your penis is used to your hand and not her vagina.
Get used to remain in her vagina.First you goal should be to remain in vagina as long as possible. You can squeeze your penis or anus to maintain the erection. Gradually increase the time. When you achieve some control, do think of intercourse.
To increase your stamina, do sat kriay , kegel exercise and male deer exercise. You may also do anal breathing exercise. Google all these phrases to know the details, learn and practice. You may also try other poses for intercourse.We have a sex specialist in MH. I am sure she will answer your question.
You may post your query in ED and Men's Health community as well.