Well, depression/anxiety and antidepressants all cause ED. Try to do your best to encourage him, don't let him worry about it and don't make him think it's a big deal. Make sure he knows you enjoy yourself regardless of the state of his penis.
It might get better, but if it is the zoloft, it probably won't unless he switches meds.