There's a bunch of problems that have to be over came. One is the ship any ship can not come in that close to port right now due to trash in the water. A carrier is very deep draft & needs at least 50 feet preferbly 75 feet or more in water depth. Weighted draft is 36-38 feet but you want some margin for navigation and the water intakes away from the ocean floor.
You don't want your fire pumps, and all other sea water intakes sucking up stuff into the strainers. It would shut the ship down and compuund the problems even more.
Really the quickest way to get power is to airlift either an Army or USAF portable power station in by helo and set it on site. That also cuts down on voltage drop you would get running cables out to a ship. Dropping in a portable generation unit is the most logical and practical and quickest alternative for on site use.
I know all that (I was a BM on a flat top). The question was asked about if it could be done with a ship’s systems. It’s be a major beyotch, but it could be done if needed.
HIGHLY agree with the airlift, though. Load up some 46’s and 53’s with the gear and personnel and get to work.