Yes! SMAPI is entirely free, and so are Steam and GOG. The only thing you need to pay for is the Stardew Valley game itself and possibly a membership to Nexus (mod site) if you want to install bigger mods.