Yes, when going on the way back from the Caribbean via SJU you have to go through TSA (after Customs and Immigration) before proceeding to your connecting gate.