If you are flying into Boston, there are airport transport companies, Mermaid Transportation and some others that provide van service into Southern Maine. The Logan Airport website may have a listing of companies.
Amtrak service into South Station from NY and points south does not connect with the Amtrak Downeaster train that runs from Boston to Portland out of NORTH Station. You have to take the T (local public transit) to get from one Amtrak to another.
Nothing is ever easy!