For future reference, service_template was deprecated in favor of service many versions ago.
Your previous stated requirement was confusing to me because an input_boolean only has two values and it’s set with the turn_on and turn_off services.
What is the application you have for setting an input_boolean’s state to be the same as a binary_sensor’s state?
How is this useful? You’d use an input boolean because you want to be able to set the state, but if the input always has the value of the sensor, what is there to change? On the other hand, you could have a sensor that reflects the value of the input to make it a kind of read-only value, but even in this case one could just use the input directly.
Anyway, to do it you will need to make an automation that triggers on the sensor’s state change and then call the appropriate service.
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions. For more information, refer to guideline 21 in the FAQ.