If his penis doesn't get enough blood it will not be able to produce and erection. If you partner is younger then there is a good chance that his failure to have an erection is psychological. If he views himself as a woman the he could be taking estrogen supplements. This will cause impotence. You need to find out if he is doing this.
Any breast development is also a sign of estrogen therapy.
Some men who enjoy anal sex channel their pleasure into their anus and do loose their erection. The key is whether or not he enjoys the sex. If he is stimulated enough from anal sex alone then he might not need to have an erection. Still his failure to have an erection, while it may not bother him, may cause you distress. If you worry that you are not pleasing him then you need to talk to him about it because this is more your problem than his.