A pathfinding solution

hi, i format my code, sorry i dont have all the good reflex yet.

well i think my problem can be resume with one part of code :

float currentSmallest = (parent.height * parent.height) + (parent.width * parent.width);
float d;
//float target;
for(int a = carn1m.size()-1; a >= 0; a--){
	for(int b = lac.size()-1; b >= 0; b--){
		Carnivor1M c1m = carn1m.get(a);
		Lac l = lac.get(b);
		d = ((c1m.position.x - l.position.x) * (c1m.position.x - l.position.x)) + ((c1m.position.y - l.position.y) * (c1m.position.y - l.position.y));
				
				
		if(d < currentSmallest){
			currentSmallest = d;
			//target = currentSmallest;
			PVector target = new PVector(l.position.x, l.position.y);
					
			c1m.arrive(target);
		}
	}
}

carn1m is my creature and lac is my water source. There are three different water sources on the map and one creature, no wall or something that can block the creature.

i need to find a way to check the positions of the three water source and the position of my creature.
then find wich of the water sources is the nearest of the creature and say its the target of my creature.