You are correct. The code works as well on my local site. Can you please add some text before the code to see if it displays on the single post page? Then make sure that you've updated the field value on the post.
If you are using a builder to create the post template, the theme's template might be ignored by the builder functions. You can try to deactivate all plugins except Meta Box and MB Extensions to re-check the code.