The easiest way to get a checkbox to align with some value is to associate it with a node in the tree instead of a global variable:

When configured in this manner, the checkbox state (checked or unchecked) stays in sync with the tree value (1 or 0), even if some external logic changes the value in the tree, which is quite convenient and useful.
If you really must use a global variable, the automatic syncing of the checkbox state with the variable value is lost. All syncing will now have to take place manually. If there is any logic that changes the global variable's value, either at reset or during the model run, there will need to be code to also find the checkbox and sync its state (check or uncheck the box using code). You would also need similar custom logic when opening the dashboard - the checkbox would need to check the global variable's value and set its state appropriately.
The treenode method is much easier and more flexible than syncing the checkbox with a global variable. Most all the work is done for you.
----------
One of the advantages of a global variable is the ease of accessing it (its global!) and its speed. If you want to be able to query a global variable because of those advantages, I suggest a hybrid approach:
Keep your global variable, but also add a treenode. Configure your checkbox to link to the treenode, as shown above. Now you need to keep the treenode's value synced with your global variable.
Anytime you set a new value to the global variable, also set the value of the treenode. Don't forget that the global variable reverts to its default value on reset, so include a reset trigger that will sync the treenode to the global variable.
This lets you get (read) the global variable value conveniently and quickly, but by syncing with a treenode each time you set (write) the global variable, you keep the benefits of syncing the checkbox with a treenode - its kind of a double-sync: you keep the treenode synced to the global variable, and FlexSim automatically keeps the checkbox synced.