There is no obligation for 2018. There is an obligation to meet 2% by 2024, and a guideline to meet 2% since 2006. They are not the same. There have been repeated efforts to intentionally misrepresent this by the Trump administration.
The guideline was agreed on in June 2006, and it explicitly stated that it doesn't represent a commitment to spend 2% GDP:
Finally, I should add that Allies through the comprehensive political guidance have committed to endeavour, to meet the 2% target of GDP devoted to defence spending. Let me be clear, this is not a hard commitment that they will do it. But it is a commitment to work towards it. And that will be a first within the Alliance. So there was, I think, quite substantial developments in the first two meetings. - Press Briefing by NATO Spokesman, James Appathurai after the meeting of the North Atlantic Council at the level of Defence Ministers, 8 June 2006
The obligation of 2% stems from a declaration in September 2014, and includes an explicit goal to reach 2% "in a decade", but no provisions to punish those who don't:
- We agree to reverse the trend of declining defence budgets [...]
Allies currently meeting the NATO guideline to spend a minimum of 2% of their Gross Domestic Product (GDP) on defence will aim to continue to do so. [...]
Allies whose current proportion of GDP spent on defence is below [2%] will:
halt any decline in defence expenditure;
aim to increase defence expenditure in real terms as GDP grows;
aim to move towards the 2% guideline within a decade with a view to meeting their NATO Capability Targets and filling NATO's capability shortfalls.
Wales Summit Declaration, 5 Sep. 2014
As recently as August 2019 the NATO secretary only referred to the guideline and the obligation mentioned above, and mentioned no other obligations regarding defense spending and GDP:
And it was back in 2014 when we made the decision that we needed fairer burden sharing, that those Allies who are spending less than 2% of GDP on defence have to increase defence spending. The good news is that, after years of reducing defence budgets, all Allies have now started to increase defence spending. More Allies meet the 2% guideline and the majority of NATO Allies have put forward plans to reach the 2% goal within a decade, within 2024, which was what we decided. - Remarks by NATO Secretary General Jens Stoltenberg at the Lowy Institute, 07 Aug. 2019
A guideline is not a synonym of an obligation:
guideline [...] information intended to advise people on how something should be done or what something should be - Cambridge Dictionary: Guideline
obligation [...] something that you must do - Cambridge Dictionary: Obligation
Trump has repeatedly used this misrepresentation, despite being made aware of the error, so we must assume that it is an intentional misrepresentation, also known as a lie:
As a candidate and as president, Mr. Trump has said that NATO member countries have failed to pay their debts to the organization. His claim misrepresents how NATO functions and conflates several different measures of the alliance’s military spending. - New York Times, 7 Sept. 2018