There is a
set_build_system command that you can use to set the current build system. With it you could create a couple of unique key bindings. For example, this one uses Ctrl+Alt+Shift+W to set the current build system to the one used to run Wren programs:
In order to have one key binding that toggles between the two build systems I think you would need to create a plugin (assuming there isn't already one) that kept track of which one it set last and set the next one. You can make a key binding contingent on a particular setting but I'm not sure if there is a context that covers build systems.
If the two dialects of Markdown are this different, are they covered by the same syntax? Build systems use syntax scopes to determine which build system to use, so perhaps there's something different about the two that you could use to set things up so that the automatic build selection would just work for you?