How do I make a boss battle that the player cannot run away from?
To make a boss that you cannot run from, go to the enemy editor and edit the boss's bitsets. You will find an Unescapable bitset. Turn it on, and it will be impossible to run away from any enemy formation that contains that Boss.
Note that the unescapable enemy doesn't need to be a boss, it could be an ordinary enemy too. Just remember that as long as there is an unescapable enemy in the formation, you cannot run away.
You might also notice that there is a bitset called Boss. This can be useful for bosses, but it actually is not required. The Boss bitset is usued in combination with the "Die without boss" bitset, so you can make minions who die when the boss is killed.