When we were in San Juan 2 years ago there was a free trolley service that ran from the vicinity of the piers through Old Town and up to the Fort and back. We walked to the Fort and rode the trolley back. There were signposts along the way that marked where the trolleys stop.
The one that we rode was free. And it was more of a tram than a trolley. Kinda' like the ones in DC that travel by the monuments and to Arlington Cemetery. It did get a bit crowded at the Fort itself. We walked to the last stop before the Fort, got on and stayed on at the Fort and got off back in Old Town and that way avoided the crowd from the Fort. It was a very, very hot day in July and the tram was a welcome joy!