<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4/A</documentType>

    <periodOfReport>2024-07-09</periodOfReport>

    <dateOfOriginalSubmission>2024-07-11</dateOfOriginalSubmission>

    <issuer>
        <issuerCik>0001865174</issuerCik>
        <issuerName>Goldman Sachs Middle Market Lending Corp. II</issuerName>
        <issuerTradingSymbol>NONE</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001676105</rptOwnerCik>
            <rptOwnerName>MARK RICHARD A</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>200 WEST STREET</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>NEW YORK</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>10282</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock, par value $0.001 per share</value>
            </securityTitle>
            <transactionDate>
                <value>2024-07-09</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>1304.3592</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>19.1665</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>10914.8899</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">This amendment is being filed to update the disclosure in Table I, Columns 4 and 5 in the Form 4 previously filed on July 11, 2024 by the reporting person in order to disclose the amount of securities acquired, the price of securities and the amount of securities beneficially owned following Mr. Mark's $25,000 capital contribution. The sale closed on July 29, 2024. When Mr. Mark's Form 4 was initially filed on July 11, 2024, the amount of securities to be acquired was not calculable.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Edward Meehan, Attorney-in-fact</signatureName>
        <signatureDate>2024-08-01</signatureDate>
    </ownerSignature>
</ownershipDocument>
