Like this post?
First of all, are you on any medication? The reason I ask is because it's a condition I have as well. It seemed to have been triggered when I was put on a course of anti-depressants (which was somewhat ironic as the resulting side effects made me even more depressed than I was to start with) which, as with beta-blocker medication have known side effects that cause cause difficulty in reaching a climax.
The only meds I am on now are for epilepsy, which my doctor says could also be the cause of the problems with climaxing. I did ask if masturbation could be causing a problem, but was assured that it is unlikely to have any effect, unless the masturbation session is within a few hours of having sex, and that the very fact that I can climax by masturbating is indicative that everything is in working order.
Of course, there is also the possibility, in your case anyway, of it being a psychological problem, especially, for instance if you are inexperienced in having sex. Whilst, when it boils down to it, sex is nothing more than a biological function, triggered by the physical stimulation of the reproductive organs, the state of mind does play a massive part in it all - as can be demonstrated by the way that so many first timers suffer from premature ejaculation, more often than not caused by nerves & excited fear of the situation.
I guess one of the most likely solutions is to build up a trust with your partner - ideally with a partner who doesn't care whether you can climax or not. It's possible that once the pressure's off, things may well sort themselves out in their own way.