The judges are elected by the Council of Europe but this has no connection with the European Parliament which is a body within the European Union. Many countries are members of the Council of Europe without being members of the EU. You have Council of Europe mixed up with the European Council...