To answer your question, no you have done nothing wrong in considering to leave your husband/boyfriend. We can't live life by doing our spouse a favour and staying with them just because they are nice. You have needs, you have wishes because your a human being.
Maybe also go deeper and try to figure out why you aren't attracted to him anymore?
There is no easy answer. But in order to make him happy, you have to be happy too. I hope things work out for you.