If you are a Swedish citizen born outside of Sweden, who never resided in Sweden prior to turning 22, and who has not maintained a strong attachment to the country (before age 22), you lose your Swedish citizenship when you turn 22.
To avoid losing your Swedish citizenship, you can apply to keep it by submitting an application to the Migration Agency. You must do so after you have turned 18 but before turning 22.
You do not need to file an application if you have lived in Sweden during any period of your life prior to your 22nd birthday, or if you visited Sweden regularly before turnign 22.
The application form and further information is available on the Swedish Migration Agency's website.
The form should be submitted to the nearest Swedish embassy or consulate - in person or via regular postal mail. If you are visiting Sweden, you can send your application directly to the Migration Agency in Norrköping.
Contact information to all Swedish consulates in the U.S. is available further down on this page.