Boston is not “away from” Massachusetts—it is the capital and largest city of the Commonwealth of Massachusetts. The question reflects a common misunderstanding: states and their capitals are not separate geographic entities; the capital is a city within the state.
People sometimes phrase “How far is Boston from Massachusetts?” as if they were two distinct locations. The correct framing would be “How far is Boston from [another city in Massachusetts]?” or “What is the distance from Boston to the state border?”
Boston is the heart of Massachusetts, not a separate destination.