If you aren't savvy with your iMac, you shouldn't be playing with MacPorts. Please visit the Gimp website and grab a DMG file from there. MacPorts and Homebrew are packaging systems that are able to build software from source (where appropriate) and install on your machine. To do the building they need the command line tools from Xcode (not all of Xcode).
Xcode is the tool used by programmers to develop applications for Mac, iOS, watchOS.