The deregistration must be done within a 3 week time frame (§ 17 (2) Bundesmeldegesetz)
- 1 week before moving out
- 2 weeks after moving out
§ 54 (3) defines a fine up to € 50.000 when the deregistration is not done within this period.
If you are actually moving out on the 30th of June, but deregister to the 30th April §54 (3) could apply. The lack of the word correctly in § 54 (2)(2) makes this unclear.
Should it apply and it became known that the purpose was solely to get out of a membership contract earlier, assume that the fine will be higher due to the fraudulent intention (of gym contract) and falsification of documents (false date in deregistration).
2) Anyone who moves out of a residence and does not move into another residence in Germany shall deregister with the registration authorities within two weeks of moving out. Deregistration shall be possible no more than one week before moving out; the population register shall be updated as of the moving-out date.
Provisions on administrative fines
(2) Anyone shall be deemed to have committed an administrative offence who, intentionally or negligently,
- fails to register, to register correctly or within the required period, in violation of Section 17 (1), also in conjunction with Section 27 (2), second sentence or Section 28 (1), first or second sentence, in violation of Section 29 (1), first sentence, or subsection 4, second sentence, or Section 32 (1), second sentence;
- fails to deregister or to deregister within the required period in violation of Section 17 (2), first sentence;
(3) The administrative offence may be punishable in the cases of subsections 1 and 2 nos. 12 and 13 with a fine of up to fifty thousand euros, and in the other cases with a fine of up to one thousand euros.