Peloton's cycling, running, and strength classes can be a nice addition to your training regimen. However, triathlon is an endurance sport, so it's best to stick to a program catered specifically to your progression in the swim, bike, and run disciplines.
If you're simply trying to log time in the saddle at home, the Peloton bike's "Just Ride" or "Scenic Ride" features are likely your best bet for training.