There is no animal called a "sea goat." It is likely you are thinking of a sea horse, which is a type of fish.
Sea horses live for 1-5 years in the wild. Their lifespan can be affected by factors like:
Water temperature: Warmer water generally leads to a shorter lifespan. Food availability: A consistent supply of food helps them live longer. Predators: The presence of predators can shorten their lifespan. Habitat: Stable and suitable habitat contributes to longer lives.
In captivity, sea horses can live up to 5-6 years under optimal conditions.