This is called blossom end rot (BER) and is caused by a calcium deficiency which can also be found on tomato and pepper plants. It appears as dark circles at the end of your fruit which causes it to soften and eventually rot. BER is caused by a calcium deficiency which occurs when the plant is not watered on a regular basis and causes the blossom end of the fruit to rot into a dark, sunken canker.
Calcium comes into the plant as it absorbs water through the roots and the best way to prevent this from occurring is to make sure you consistently water your zucchini throughout the season. Remove any zucchini that is affected.