The code I have so far is:

let burger = document.querySelector('.burger');
burger.addEventListener('click', function(e) {
  burger.classList.toggle('active');
});
.settings-container .amd-app {
  margin: auto;
  padding: 10px;
  background-color: white;
  width: 575px;
  height: 280px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}



label {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  cursor: pointer;
  display: block;
  margin: 1em;
}
label > input {
  display: none;
}
label span {
  color: #6A759B;
}
label i {
  display: inline-block;
  width: 64px;
  height: 40px;
  border-radius: 20px;
  vertical-align: middle;
  transition: 0.25s 0.09s;
  position: relative;
  background: #deeff7;
}
label i:after {
  content: " ";
  display: block;
  width: 30px;
  height: 30px;
  top: 5px;
  left: 5px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  box-shadow: 1px 2px 4px 0 rgba(0, 0, 0, 0.4);
  transition: 0.15s;
}
label > input:checked + i {
  background: #1094fb;
}
label > input:checked + i + span {
  color: #29316b;
}
label > input:checked + i:after {
  transform: translateX(25px);
}




body {
  align-items: center;
  background: #708fd4;
  display: flex;
  height: 100%;
  justify-content: center;
  margin: 0;
  position: absolute;
  width: 100%;
}

.filter {
  position: absolute;
}

.burger {
  display: flex;
  flex-direction: column;
  filter: url(#gooeyness);
  padding: 30px;
}

.rect {
  background: white;
  display: inline-block;
  height: 32px;
  margin-top: 40px;
  transition: transform 500ms;
  width: 200px;
}

.rect:nth-child(2) {
  transition-delay: 100ms;
}

.rect:nth-child(3) {
  transition-delay: 100ms;
}

.burger.active .rect:nth-child(1) {
  transform: rotate(-45deg) translateX(-51px) translateY(50px);
}

.burger.active .rect:nth-child(2) {
  transform: rotate(45deg);
}

.burger.active .rect:nth-child(3) {
  transform: rotate(-45deg) translateX(51px) translateY(-50px);
}




.close {
  
}
<div class="settings-container">
  <div class="amd-app">
    <div class="amd-intro">
      
      <hr>
    </div>
    <div class="amd-info text-center">
      
  
<label>
  <input class="cb cb1" type="checkbox" name="social"  checked/>
  <i></i> 
  <span>آموزش کارت حتی در صورت پاسخ صحیح</span> 
</label>
      
      <label>
  <input class="cb cb1" type="checkbox" name="social"  checked/>
  <i></i> 
  <span>ضبط صدا در صورت استفاده از تشخیص گفتار</span> 
</label>
      
            <label>
  <input class="cb cb1" type="checkbox" name="social"  checked/>
  <i></i> 
  <span>نمایش جلوه های ویژه ی صوتی و بصری</span> 
</label>
  
  
    </div>
    
  </div>
</div>

<div class="close">
  
<svg class="filter" version="1.1">
  <defs>
    <filter id="gooeyness">
      <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
      <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 20 -10" result="gooeyness" />
      <feComposite in="SourceGraphic" in2="gooeyness" operator="atop" />
    </filter>
  </defs>
</svg>
<div class="burger">
  <div class="rect"></div>
  <div class="rect"></div>
  <div class="rect"></div>
</div>
</div>

The problem is that I can’t put the close button in the upper right corner of the white panel.

If I do that everything gets distorted !!

You can use absolute positioning:

let burger = document.querySelector('.burger');
burger.addEventListener('click', function(e) {
  burger.classList.toggle('active');
});
.settings-container .amd-app {
  margin: auto;
  padding: 10px;
  background-color: white;
  width: 575px;
  height: 280px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.settings-container {
  position: relative;
}

label {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  cursor: pointer;
  display: block;
  margin: 1em;
}

label>input {
  display: none;
}

label span {
  color: #6A759B;
}

label i {
  display: inline-block;
  width: 64px;
  height: 40px;
  border-radius: 20px;
  vertical-align: middle;
  transition: 0.25s 0.09s;
  position: relative;
  background: #deeff7;
}

label i:after {
  content: " ";
  display: block;
  width: 30px;
  height: 30px;
  top: 5px;
  left: 5px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  box-shadow: 1px 2px 4px 0 rgba(0, 0, 0, 0.4);
  transition: 0.15s;
}

label>input:checked+i {
  background: #1094fb;
}

label>input:checked+i+span {
  color: #29316b;
}

label>input:checked+i:after {
  transform: translateX(25px);
}

body {
  align-items: center;
  background: #708fd4;
  display: flex;
  height: 100%;
  justify-content: center;
  margin: 0;
  position: absolute;
  width: 100%;
}

.filter {
  position: absolute;
}

.burger {
  display: flex;
  flex-direction: column;
  filter: url(#gooeyness);
  padding: 30px;
  background-color: black;
  /* for demonstration purposes only */
}

.rect {
  background: white;
  display: inline-block;
  height: 32px;
  margin-top: 40px;
  transition: transform 500ms;
  width: 200px;
}

.rect:nth-child(2) {
  transition-delay: 100ms;
}

.rect:nth-child(3) {
  transition-delay: 100ms;
}

.burger.active .rect:nth-child(1) {
  transform: rotate(-45deg) translateX(-51px) translateY(50px);
}

.burger.active .rect:nth-child(2) {
  transform: rotate(45deg);
}

.burger.active .rect:nth-child(3) {
  transform: rotate(-45deg) translateX(51px) translateY(-50px);
}

.close {
  position: absolute;
  right: 0px;
  top: 0px;
}
<div class="settings-container">
  <div class="amd-app">
    <div class="amd-intro">

      <hr>
    </div>
    <div class="amd-info text-center">


      <label>
  <input class="cb cb1" type="checkbox" name="social"  checked/>
  <i></i> 
  <span>آموزش کارت حتی در صورت پاسخ صحیح</span> 
</label>

      <label>
  <input class="cb cb1" type="checkbox" name="social"  checked/>
  <i></i> 
  <span>ضبط صدا در صورت استفاده از تشخیص گفتار</span> 
</label>

      <label>
  <input class="cb cb1" type="checkbox" name="social"  checked/>
  <i></i> 
  <span>نمایش جلوه های ویژه ی صوتی و بصری</span> 
</label>


    </div>

  </div>

  <div class="close">

    <svg class="filter" version="1.1">
  <defs>
    <filter id="gooeyness">
      <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
      <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 20 -10" result="gooeyness" />
      <feComposite in="SourceGraphic" in2="gooeyness" operator="atop" />
    </filter>
  </defs>
</svg>
    <div class="burger">
      <div class="rect"></div>
      <div class="rect"></div>
      <div class="rect"></div>
    </div>
  </div>
</div>

You can first create a container that wraps both the element and the use. flexbox As

.panel-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
let burger = document.querySelector('.burger');
burger.addEventListener('click', function(e) {
  burger.classList.toggle('active');
});
.panel-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.settings-container .amd-app {
  margin: auto;
  padding: 10px;
  background-color: white;
  width: 575px;
  height: 280px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

label {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  cursor: pointer;
  display: block;
  margin: 1em;
}

label>input {
  display: none;
}

label span {
  color: #6a759b;
}

label i {
  display: inline-block;
  width: 64px;
  height: 40px;
  border-radius: 20px;
  vertical-align: middle;
  transition: 0.25s 0.09s;
  position: relative;
  background: #deeff7;
}

label i:after {
  content: " ";
  display: block;
  width: 30px;
  height: 30px;
  top: 5px;
  left: 5px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  box-shadow: 1px 2px 4px 0 rgba(0, 0, 0, 0.4);
  transition: 0.15s;
}

label>input:checked+i {
  background: #1094fb;
}

label>input:checked+i+span {
  color: #29316b;
}

label>input:checked+i:after {
  transform: translateX(25px);
}

body {
  align-items: center;
  background: #708fd4;
  display: flex;
  height: 100%;
  justify-content: center;
  margin: 0;
  position: absolute;
  width: 100%;
}

.filter {
  position: absolute;
}

.burger {
  display: flex;
  flex-direction: column;
  filter: url(#gooeyness);
  padding: 30px;
}

.rect {
  background: white;
  display: inline-block;
  height: 32px;
  margin-top: 40px;
  transition: transform 500ms;
  width: 200px;
}

.rect:nth-child(2) {
  transition-delay: 100ms;
}

.rect:nth-child(3) {
  transition-delay: 100ms;
}

.burger.active .rect:nth-child(1) {
  transform: rotate(-45deg) translateX(-51px) translateY(50px);
}

.burger.active .rect:nth-child(2) {
  transform: rotate(45deg);
}

.burger.active .rect:nth-child(3) {
  transform: rotate(-45deg) translateX(51px) translateY(-50px);
}

.close {}
<div class="panel-container">
  <div class="settings-container">
    <div class="amd-app">
      <div class="amd-intro">

        <hr>
      </div>
      <div class="amd-info text-center">


        <label>
              <input class="cb cb1" type="checkbox" name="social" checked />
              <i></i>
              <span>آموزش کارت حتی در صورت پاسخ صحیح</span>
            </label>

        <label>
              <input class="cb cb1" type="checkbox" name="social" checked />
              <i></i>
              <span>ضبط صدا در صورت استفاده از تشخیص گفتار</span>
            </label>

        <label>
              <input class="cb cb1" type="checkbox" name="social" checked />
              <i></i>
              <span>نمایش جلوه های ویژه ی صوتی و بصری</span>
            </label>


      </div>

    </div>
  </div>

  <div class="close">

    <svg class="filter" version="1.1">
          <defs>
            <filter id="gooeyness">
              <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
              <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 20 -10" result="gooeyness" />
              <feComposite in="SourceGraphic" in2="gooeyness" operator="atop" />
            </filter>
          </defs>
        </svg>
    <div class="burger">
      <div class="rect"></div>
      <div class="rect"></div>
      <div class="rect"></div>
    </div>
  </div>
</div>