Heineken has confirmed it is to close one of its breweries in Spain.