Hello,
I've come across similar and it's a pain. EAGLE imports exactly what is provided to it but if the DXF doesn't contain a closed shape then it will not detect as a correct board outline. I've had to resort to manually tweaking the start/end points of segments in order to make them match the connecting segments which can be time consuming.
The first thing I would try would be to see if you can get Solidworks to close the outline before it's exported to DXF as it sounds like the problem is the output from Solidworks is not closed. I'm not a Solidworks user so I don't know how this might be done.
Alternatively, you could import the dxf into Fusion360 and then use the EAGLE/Fusion360 integration to pull the board outline from there which should bring it in correctly.
Best Regards,
Rachael