Legoland is located in Carlsbad, California, which is about 32 miles away from the San Diego International Airport. The best way to get to Legoland from the airport is by renting a car and driving, although there are also several public transportation options available.
If you choose to drive, the trip should take you about 40 minutes without traffic. However, if you're visiting during peak tourist season (between April and September), it's likely that traffic will be heavier and the trip may take closer to an hour.
There are also several different public transportation options available from the airport to Legoland. You can take a bus directly from the terminal to Legoland (route 929).