I'm trying to convert from EPSG 26191 to WGS, here is the code im using to transform but it still prints for me when I get the SRID as 26191.
CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:26191");
CoordinateReferenceSystem targetCRS= CRS.decode("EPSG:4326");
MathTransform transform = CRS.findMathTransform(targetCRS, sourceCRS);
var x = JTS.transform(sourceGeometry, transform);
System.out.println(x.getSRID());