Presuming that find
finds one and only one match for the search pattern, you can use
cd "$( dirname "$( find -name "portmap" )" )"
If at any time you want to do to the directory enumerated in the output of the previous command, you can use
cd "$( dirname "$(!!)" )"