Sometimes it matters, sometimes it doesn't. Usually the safe route to go is the opposite gender. They tend to feel a little less of a threat. With only 2 cats, the chances are about 50/50
I had a male(Su) and female cat(hooda) and the male passed on. When the time came to get another cat I wanted a male tabby kitten, just like Su was. Hooda would have no part of that kitten.So I had to return him to the shelter. So a few months passed and I tryed again, I thought i would get an adult male tabby. And Hooda hated him more the the kitten. He had to go back(I had him nutered and vacinated in the short time i had him and he found a new home 10 minuets after i brought him back into the shelter, I was releived for that). Then I thought, I cant pick the kitty I want I have to pick a kitty Hooda would want. So I looked through the shelter for a female that I thought was most like hooda. And that solved the problem. With in 3 days they were used to eachother,no hissing, all good. This is an instance were opposites dident attract.