Both male and female translations are correct. Perhaps you mismatched the gender? 'un chien' and 'une chienne' are both OK, but 'un chienne' or 'une chien' are incorrect due to a gender mismatch. You can pick either gender, so long as you translate it correctly.