My husband had prostatectomy 3 months ago and refuses to have sex with me. I know he is capable because he masturbates frequently. Why is he avoiding?

Marriage counseling. Consider going to marriage counseling or perhaps consider asking your husband to attend some individual counseling. There are numerous reasons a person may avoid being intimate with their partner, it is important to have your husband work through the underlying issues he has.
Anxiety. There are many reasons. He may have concerns about recovery, trauma, etc. Talk to him and get a dialogue going.