It could be you are nervous. If this is the case, try some deep breathing, breathing from your belly, to relax you. Also, a regular hatha yoga practice will increase your energy levels and at the same time relax you.
Or there could be a lack of chemistry. When a woman is in bed with me, but not really interested for some reason (could be a deep and old issue), the sexua| energy does not flow.
One thing you can play with is soft penetration. You can read about this in google. With a combination of lubrication, and using a compatible position (like the scissor position), your soft penis can enter the vagina. After the soft penetration, just feel each others genitals, and who knows, the chemistry and the energy might just start flowing and you may find yourself with an erection.