Your calculations are correct, as long as assumptions are correct (which may be not the case, as noted by Greg Snow in the comment section). However, one important problem is that this is quite a small sample size, so drawing conclusions about your population of interest may be trickier than you think. In particular, due to this small sample size, you may be largely overestimating the difference between men and women, and you might even be drawing a completely erroneous conclusion about which group is more likely to fail the exam.
When reading your conclusion, one wonders what course of action should be taken next. You don't mention any previous study about the issue at hand, or what is the motivation for conducting this study in the first place. If this a real-life problem and not an exercise from a textbook, you should be able to express this motivation in everyday language, without using statistical terms like "statistical significance" and whatnot.
By the way, it is a bit unclear what is the population of interest you're trying to draw conclusions on. When you write a general statement such as "there is a statistically significant association between gender discrimination and failing ", what is the population you are referring to? You should clarify that.
It is also unclear what you mean by discrimination, as pointed out in the comment section. If you mean "Are women discriminated against by this instructor?", the Fisher's exact test and the study design would not allow to say that, as you need to control for many other factors - in particular when discrimination can take root in long-past events and take many different forms, possibly beyond the university or instructor's control. When reading your conclusion, someone hasty and unfamiliar with statistics might be tempted to say that the instructor is discriminating against women, while the data and the test are largely insufficient to make such a statement. You should clarify that too.
But leaving all that aside for a moment, are you really interested in testing the null hypothesis of no difference between men and women? If before looking at the table you already knew that the null hypothesis was not true, then you're not really interested in rejecting the null hypothesis, but you are interested in assessing the difference between men and women.
The difference of percentage we observe between men and women in your sample is pretty large (0% failing among men vs. 50% failing among women). Do you think it is plausible that it reflects well what would happen if we multiplied the sample size by 100?
30 observations may make the test underpowered to detect the "real" underlying difference between men and women. When you get a small p-value with an underpowered study, the difference we see in the sample will be exaggerated and may be even in the wrong direction.
With a sample size of 6 women and 24 men and a criteria p < 0.05, the smallest absolute risk difference (percentage of women failing minus percentage of men failing) that would lead to a significant result is 33%: 2 women failing out of 6, and 0 men failing out of 24 (or alternatively, 24 men failing and 4 women failing).
Below is a histogram showing all possible observable risk differences with a sample size like yours, with a p-value < 0.05. You see that with this kind of sample, a risk difference between -33% and +33% never has a p-value < 0.05.

So if the difference in failing between men and women exists, but is in reality anywhere between -33% and +33%, this sample size would not allow to assess its real magnitude (and possibly its direction; if the magnitude of the real risk difference is small enough, your sample with a significant p-value may be showing that women are more likely to fail than men when in reality they might be less likely to fail -see type S error).
Your test and conclusion probably calls for collecting more data and looking at previous studies, to give your study more context and avoid too hasty conclusions relative to what is happening in this class (besides the obvious underrepresentation of women).
Does the risk difference observed in your sample (50%) plausibly reflect the "real" underlying risk difference between men and women, regarding failing the exam? You should report the risk difference observed in your sample, and mention what previous studies say on the subject.