Unfortunately, Super Mario 3D All-Stars will soon be unavailable to purchase on the Nintendo eShop, but that doesn't mean you won't be able to get your hands on the game past that date. While the title will no longer be purchasable digitally past March 31, you might still be able to get your hands on a retail copy past that date, and if you end up grabbing a retail download code copy, you will still be able to redeem and download it from the eShop.
This information comes from Nintendo themselves who told VGC that codes from retailers could still be redeemed "after April," which is especially handy since the game will not be getting anymore physical copies past March 31 either. Nintendo did also previously state that owners of the game would be able to redownload the game in the future, provided they already own a copy of it.
In a similar case, the special edition Super Mario Bros. Game & Watch will also no longer be manufactured past April 1, so if you haven't already, make sure to grab one before stocks run out.