Manca il cast a String: il metodo get() di ArrayList ritorna un Object:
codice:
if ( fileName.endsWith((String) extensions.get(i)) ) {
   ...
}
Ciao.