You must first have the Peloton app on your Apple device (iPhone, iPad) and also on the Apple Watch.
From there, you can open the Peloton app and follow these instructions:
More > Apple Watch > Set Up > Connect to Health App
From there, follow the on screen instructions and you should be good to go.