If you have a license key to draw.io for Confluence Server, go to BASE_URL/plugins/servlet/upm (where BASE_URL is the full path defined as base in your Confluence instance). Then find and click to expand the listing "Draw.io Confluence Plugin". One of the field is labelled "License key":

Click the pen on the right of that field to open a text field. Clear the field and paste your new license key, then press "update". draw.io will now be licensed.