How can I transition an order from fulfillment to completed?
Perhaps one way to do this would be similar to what you can find in modules/contrib/commerce/modules/order/templates/commerce-order--admin.html.twig
{# If the order has possible transitions, render the field for transition buttons. #}
{% if order_entity.getState.getTransitions is not empty %}
&lt;div class=&quot;entity-meta__header&quot;&gt;
  {{ order.state }}
&lt;/div&gt;
{% endif %}

If the order is configured to pass from state fullfilled to completed the appropriate button for moving state should be available there.  Make sure your order_entity is passed to the twig template.
Read more about order workflow states