The Treasury Department announced late last month that it is ending the Obama administration's myRA program, a savings account designed to help low- and middle-income savers put money away for retirement.

The myRA launched nationwide in 2015 as a spinoff of the Roth IRA. It was positioned as a starter retirement account, giving savers the ability to make contributions directly from their paychecks.

The account had the same income eligibility requirements as a Roth IRA but offered Treasury savings bonds as the only investment option, appealing to savers who feared losing their principal.

In a news release about the end of the program, U.S. Treasurer Jovita Carranza said a review of the myRA program found that it wasn't cost-effective.

"The myRA program was created to help low to middle income earners start saving for retirement. Unfortunately, there has been very little demand for the program, and the cost to taxpayers cannot be justified by the assets in the program," Carranza said in the statement.

That low demand may have been because there are other — potentially better — retirement savings vehicles out there, including the Roth IRA. Here's how to invest for retirement in absence of the myRA.

Transfer your account

The myRA website was quickly replaced with a short FAQ, which noted that the Treasury Department would reach out to current account holders with information about how to close or transfer existing accounts.

The best place to transfer that money is a Roth IRA, which was the basis for the myRA in the first place. The accounts share many similarities — the myRA was intended as a steppingstone to the Roth IRA, and myRA accounts had a balance limit of $15,000, at which point investors would be asked to transfer their balances, anyway. To transfer your balance, open a Roth IRA and ask the account provider to help you initiate a direct rollover, which will seamlessly move your money between accounts. Most brokers will allow you to quickly open a Roth IRA online.

Don't take a distribution

The alternative to a direct rollover is to take a distribution of your account balance.

Because myRA contributions are made after taxes, they can technically be pulled out at any time, free of taxes and penalties.

However, doing so is a blow to the retirement savings you have built, and you could be taxed or penalized if you also withdraw the earnings on those contributions.

Let's say you're 35 and you have $10,000 in the account. That may not seem like much when you consider how much you will need for retirement, but over the next 30 years, it could grow to nearly six times that amount in a Roth IRA, assuming a 6 percent investment return. That's with no additional contributions on your part.

Invest your balance

What a myRA didn't offer that a Roth IRA does: the ability to select investments beyond ultrasafe Treasury savings bonds. Roth IRA providers offer a wide selection of investment options, including low-cost index funds and exchange-traded funds.

These funds allow you to buy a basket of investments — like stocks, bonds or both — in a single transaction, by tracking an index like the Standard & Poor's 500. They're an inexpensive and quick way to build a diversified portfolio, which reduces your risk.

"A Roth IRA is a great alternative; an investor would likely see better returns because they are moving from one government fund to an open investment architecture," said Steve Minkoff, a certified financial planner in San Francisco.

If you have a long time horizon, investing in an index fund that holds stocks will allow your money to grow much faster.

According to a recent analysis by NerdWallet, choosing a safe vehicle like a savings account over investing in the stock market could result in a $3.3 million difference in how much you are able to accumulate over 40 years.

The low-return savings bonds offered within a myRA are likely to fall short in a similar fashion.

Continue to make contributions

There is one feature of the myRA that can't be easily replicated with a Roth IRA, and that's the ability to make contributions automatically via paycheck deferral.

That means you have to self-motivate a bit, by setting up automatic contributions to your new Roth IRA.

Ask your bank to make that transfer at the beginning of the month or after your first paycheck of the month, so the money is saved before you have a chance to spend it.

In 2017, you can contribute $5,500 to a Roth IRA, or $6,500 if you're 50 or older. Any contributions you've made to your myRA this year will reduce that limit.

Arielle O'Shea is a staff writer at NerdWallet, a personal finance website.