If your refrigerator has a water filter, you may need to change it if it has been more than 6 months since it was last replaced.
Ice cubes in the storage bin will absorb odors from the freezer and refrigerator. This can cause bad taste in the ice cubes. I recommend that you dispose of all of the current ice in your storage bin (you can use it to water plants if you want to). Allow the ice maker to make fresh ice and see if you still detect the bad taste. If not, the bad taste could be coming from food stored in the refrigerator and/or freezer. Make sure that food stored in both compartments is properly sealed to prevent the odor/taste from migrating to the ice.
If the same taste is detected in the new ice and you have a water filter on the refrigerator, I recommend that you try removing the water filter for about 1 week and allow chlorinated water to flow through the water system in your ice maker. In some situations, a water filter will remove chlorine and harmless cysts will develop in the water system of the refrigerator that will affect the taste of the ice. Running chlorinated city water through the refrigerator water system will kill the cysts and eliminate this problem. I assume that you are in the city where the water supply is chlorinated. If you are on a ground water well system in a rural area, the cysts may be harder to eliminate. Let me know if you need more help with this problem.
These tips will hopefully help you resolve this taste problem with your ice. If you need more help, submit additional details and the full model number of your refrigerator.