Other than what I pointed out I don’t see anything wrong with the bit of code that you posted.
Is your checkbox field a sub field?
Where is this loop that is not working, it is inside of a WP have_posts() loop?
Will need a bigger picture of your fields setup and code.