Chances are you've overcooked it. Try checking your cod every 5 minutes while it's in the oven, and take it out as soon as it gets flaky. You can also lather it up with some olive oil or butter to keep it moist.