To be certain, you should:
1. Consult a repair manual specific to your 1997 Buick Riviera. A Haynes or Chilton manual will have diagrams and precise locations. This is the most reliable method.
2. Check online forums and resources dedicated to Buick Rivieras. Owners' forums often have discussions about repairs, and someone may have already posted pictures of the sensor's location.
Without knowing the exact transmission type, pinpointing the location precisely is difficult. However, starting your search on the transmission case is your best bet. It's usually a relatively accessible sensor.